public static boolean idExists(final Object id, final Object... providedIds) {
        if (0 == providedIds.length) return true;

        //unbox any GValues which may be present in providedIds
        Object[] idValues = GValue.resolveToValues(GValue.ensureGValues(providedIds));

        // it is OK to evaluate equality of ids via toString() now given that the toString() the test suite
        // enforces the value of id.()toString() to be a first class representation of the identifier
        if (1 == idValues.length) {
            return id != null && idValues[0] != null && id.toString().equals(idValues[0].toString());
        } else {
            for (final Object temp : idValues) {
                if (id != null && temp != null && temp.toString().equals(id.toString()))
                    return true;
            }
            return false;
        }
    }
Checks if a key exists within a list of provided keys. Returns {@code false} if the key is {@code null} or if
the {@link Graph.Hidden}. Returns {@code true} if no {@code providedKeys} are supplied.

@param key must not be {@code null}
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java