code: public static Date toDate(final Object value) {
  		if (value instanceof Date) {
  			return (Date) value;
  		}
  		if (value == null || value.equals("null")) {
  			return null;
  		}
  		if (value instanceof String) {
  			throw new IllegalStateException("fix me");
  		}
  
  		return null;
  	}
docs: To date.
  
  @param value the value
  @return the date