public static boolean instanceOf(final Object o, final GType type) {
        if (null == o)
            return false;
        else if (o instanceof GValue)
            return ((GValue) o).getType() == type;
        else
            return type.getJavaType().isAssignableFrom(o.getClass());
    }
Checks the type of the object against the provided {@link GType}. If the object is a {@link GValue} then it
can directly check the type, otherwise it will test the given object's class itself using the mapping on the
{@link GType}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/GValue.java