if(value.equals("NULL"))
if (value.equals("NULL")) {
    public static Object stringToObject(Class clazz, String value) {        if (clazz.equals(Integer.class) || clazz.equals(Integer.TYPE)) {            return Integer.valueOf(value);        }        if (clazz.equals(Boolean.class) || clazz.equals(Boolean.TYPE)) {            if(value.equals("NULL"))                return "NULL";            else                return Boolean.valueOf(value);        }        if (clazz.equals(Double.class) || clazz.equals(Double.TYPE)) {            return Double.valueOf(value);        }        if (clazz.equals(Float.class) || clazz.equals(Float.TYPE)) {            return Float.valueOf(value);        }        if (clazz.equals(Long.class)  || clazz.equals(Long.TYPE)) {            return Long.valueOf(value);        }        if (clazz.equals(Short.class) || clazz.equals(Short.TYPE)) {            return Short.valueOf(value);        }        if (clazz.equals(Byte.class) || clazz.equals(Byte.TYPE)) {            return Byte.valueOf(value);        }        if (clazz.equals(Character.class) || clazz.equals(Character.TYPE)) {            return new Character(value.charAt(0));        }        if (clazz.equals(Date.class)) {            return new Date(Long.parseLong(value));        }        if (clazz.equals(BigDecimal.class)) {            return new BigDecimal(value);        }        if (clazz.equals(String.class)) {            return value;        }        if (clazz.equals(URL.class)) {            try {                return new URL(value);            } catch (MalformedURLException e) {                throw new RuntimeException(e);            }        }        return value;    }