public Number expectNumberValue() {
        if (value instanceof Number) {
            return (Number) value;
        }

        throw new JmespathException("Expected a number literal, but found " + value.getClass());
    }
Gets the value as a number.

@return Returns the number value.
@throws JmespathException if the value is not a number.
smithy-jmespath/src/main/java/software/amazon/smithy/jmespath/ast/LiteralExpression.java