* @return True if the string value is a valid (not counting the null enumeration), false otherwise.
*/
public static boolean isValid(Class clazz, String value) {
try {
if (isStringEnum(clazz)) {
StringEnum constant = (StringEnum) getEnum(clazz, value);
return constant.getValue() != null;
} else if (isIntegerEnum(clazz)) {
IntegerEnum constant = (IntegerEnum) getEnum(clazz, value);
return constant.getValue() != null;
} else {
return false;
}
} catch (EnumException e) {
return false;