code: static Date parseDate(String dateString) {
      try {
        return DATE_FORMAT.parseDateTime(dateString).toDate();
      } catch (IllegalArgumentException e) {
        return null;
      }
    }
docs: Parses the date or returns null if it fails to do so.