default Number toNumber() {
        if (hasNumericValue()) {
            if (hasFractionalPart()) {
                return toDouble();
            } else {
                return toLong();
            }
        } else {
            return null;
        }
    }
@return The {@link Val} as a number or null if it cannot be represented as a number.
Returns an impl of {@link Number} that is appropriate for this value. The returned type may differ for
different values of the same Val impl, e.g. "123" and "1.23"
stroom-query/stroom-query-language/src/main/java/stroom/query/language/functions/Val.java