public static void validateVariable(final String variable, final Object value) throws IllegalArgumentException {
        if (null == value)
            throw Graph.Variables.Exceptions.variableValueCanNotBeNull();
        if (null == variable)
            throw Graph.Variables.Exceptions.variableKeyCanNotBeNull();
        if (variable.isEmpty())
            throw Graph.Variables.Exceptions.variableKeyCanNotBeEmpty();
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/GraphVariableHelper.java