@Override
            public Object convert(final Object id) {
                if (null == id)
                    return null;
                else  if (id instanceof String) {
                    if (((String)id).isEmpty())
                        throw new IllegalArgumentException("Expected a non-empty string but received an empty string.");

                    return id;
                } else
                    throw new IllegalArgumentException(createErrorMessage(java.lang.String.class, id));
            }
Manages identifiers of type {@code String}.
tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/AbstractTinkerGraph.java