static int? processYear(String? year) { return year != null && RegExp(r"^\d{4}$").hasMatch(year) ? int.parse(year) : null; }