@Override
    public String idFromValueAndType(final Object o, final Class<?> aClass) {
        if (!typeToId.containsKey(aClass)) {
            // If one wants to serialize an object with a type, but hasn't registered
            // a typeID for that class, fail.
            throw new IllegalArgumentException(String.format("Could not find a type identifier for the class : %s. " +
                    "Make sure the value to serialize has a type identifier registered for its class.", aClass));
        } else {
            return typeToId.get(aClass);
        }
    }
Provides quick lookup for Type deserialization extracted from the JSON payload. As well as the Java Object to types
compatible for the version 2.0 of GraphSON.

@author Kevin Gallardo (https://kgdo.me)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeIdResolver.java