Converts a DateTime to a serializable String.
typedef DateTimeSerializer = String? Function(DateTime? value);