public static Number numberOf(final Object either) {
        final Object o = valueOf(either);
        if (o instanceof Number)
            return (Number) o;
        else
            throw new IllegalStateException("Argument is not a number");
    }
Takes an argument that is either a {@code GValue} or an object and returns its {@code Number} form, otherwise
throws an exception.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/GValue.java