private static boolean comparable(final Object f, final Object s) {
        if (f == null || s == null)
            return f == s; // true iff both in the null space

        final Type ft = Type.type(f);
        final Type st = Type.type(s);

        // Check for same type. If they're both the unknown type then return true iff they are naturally Comparable
        return ft == Type.Unknown && st == Type.Unknown ? naturallyComparable(f, s) : ft == st;
    }
Return true if the two objects are of the same comparison type (although they may not be the exact same Class)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/GremlinValueComparator.java