DateTime? asDateTime(dynamic value, {String? format}){ if(isNullOrEmpty(value)) return null; if(value is String){ return stringToDate(value, dateFormat: format); } return DateTime.now(); }