ValueMaker vm = ((TypedNodeMaker) nm).valueMaker();
Node node = constant.getNode();
logger.debug("checking " + node + " with " + nm);
if (XSD.isNumeric(node)) {
DetermineNodeType filter = new DetermineNodeType();
nm.describeSelf(filter);
RDFDatatype datatype = filter.getDatatype();
if (datatype != null && XSD.isNumeric(datatype)) {
RDFDatatype numericType = XSD.getNumericType(datatype, node.getLiteralDatatype());
nm = cast(nm, numericType);
node = XSD.cast(node, numericType);