} catch (ArithmeticException ex) {
// No, it can not be converted to long
try {
// Can it be an integer
BigInteger bi = bd.toBigIntegerExact();
this.valueType = XSD_INTEGER;
this.value = bi;
this.isDecimal = false;
} catch (ArithmeticException ex1) {
// OK, its a decimal