DateTime? toDate([String format = 'yyyy-MM-dd']) { try { return DateTime.parse(this); } catch (_) { return null; } }