protected void checkArguments(List<FieldValue> arguments, int size, boolean allowNulls) {

    if (arguments.size() != size) {
      throw new FunctionException(
          getName(), "Expected " + size + " arguments, but got " + arguments.size() + " arguments");
    } // End if

    if (!allowNulls && arguments.contains(null)) {
      throw new FunctionException(getName(), "Missing arguments");
    }
  }