DateTime? dateFromString(String? string) { if (string == null) return null; return DateTime.parse(string); }