code: private Script toScript(final String name, final Object[] args, final int index) {
  
  		if (index >= args.length) {
  			return null;
  		}
  
  		final Object value = args[index];
  
  		if (value instanceof Script) {
  
  			return (Script)value;
  		}
  
  		if (value == null) {
  
  			logger.warn("Invalid argument {} for Structr.batch(): expected script, got null.");
  
  		} else {
  
  			logger.warn("Invalid argument {} for Structr.batch(): expected script, got {}", name, value.getClass());
  		}
  
  		return null;
  	}
docs: ----- private methods -----