try {
final BigDecimal valueBigDecimal = new BigDecimal(valueString);
if (returnType.isAssignableFrom(BigDecimal.class)) {
return returnType.cast(valueBigDecimal);
} else if (returnType.isAssignableFrom(Long.class)) {
return returnType.cast(valueBigDecimal.longValueExact());
} else if (returnType.isAssignableFrom(Integer.class)) {
return returnType.cast(valueBigDecimal.intValueExact());
} else if (returnType.isAssignableFrom(Short.class)) {
return returnType.cast(valueBigDecimal.shortValueExact());
} else if (returnType.isAssignableFrom(Byte.class)) {