@Override
    public void put(final String key, final Object value) {
        if (null == key) throw new IllegalArgumentException("key may not be null");
        if (key.isEmpty()) throw new IllegalArgumentException("key may not be empty");
        globalScope.put(key, value);
    }
Sets the specified key/value pair in the global scope. The key may not be null or empty.

@throws IllegalArgumentException if key is null or empty.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java