docs: public static Date getRightDate(final Object object2) {
          if (object2 == null) {
              return null;
          }
          if (object2 instanceof String) {
              return parseDate((String) object2);
          } else if (object2 instanceof Date) {
              return (Date) object2;
          } else {
              throw new IllegalArgumentException("Unable to convert "
                      + object2.getClass() + " to a Date.");
          }
      }