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;
	}
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 ; }
To date.

@param value the value
@return the date