code: public static void checkIsSetLocal(final DelegateExecution execution, final String variableName) {
      Preconditions.checkArgument(variableName != null, VARIABLE_NAME_MUST_BE_NOT_NULL);
  
      final Object variableLocal = execution.getVariableLocal(variableName);
      Preconditions.checkState(variableLocal != null,
          String.format("Condition of task '%s' is violated: Local variable '%s' is not set.", new Object[] { execution.getCurrentActivityId(), variableName }));
    }
docs: Checks, if a local variable with specified name is set.
  
  @param execution
  process execution.
  @param variableName
  name of the variable to check.