@Override
        public int compare(final Object f, final Object s) {
            // For Compare, NaN always produces ERROR
            if (eitherAreNaN(f, s))
                throwTypeError();

            // For Compare we do not cross type boundaries, including null
            if (!comparable(f, s))
                throwTypeError();

            // comparable(f, s) assures that type(f) == type(s)
            final Type type = Type.type(f);
            return comparator(type).compare(f, s);
        }
Compare two Gremlin value objects per the Comparability semantics. Throws type errors for NaN comparison
and for cross-type comparison (including nulltype).

Use this method for P.lt/lte/gt/gte.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/GremlinValueComparator.java