private boolean containersOfDifferentSize(final Object f, final Object s) {
            if (f instanceof Collection && s instanceof Collection)
                if (((Collection) f).size() != (((Collection) s).size()))
                    return true;

            if (f instanceof Path && s instanceof Path)
                if (((Path) f).size() != (((Path) s).size()))
                    return true;

            return false;
        }
By routing through the compare(f, s) path we expose ourselves to type errors, which should be
reduced to false for equality:

compare(NaN, anything) -> ERROR -> FALSE for equality
compare(Type1, Type2) -> ERROR -> FALSE for equality

Can also happen for elements nested inside of collections.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/GremlinValueComparator.java