public static DateTime ToDateTime(this object foo) { if (foo.IsNull()) return DateTime.MinValue; else return Convert.ToDateTime(foo); }