/** * Returns true if the given value is in order according to this * specification, meaning that it has the correct type or is null. * * @param value a value. * * @return true if the given value is in order according to this * specification, meaning that it has the correct type or is null. */ public boolean validate(final Value value) { if (value == null) { return true; } return value.getType() == type; }