code: public void addFunctionArgument(final BELObject arg) {
          if (arg == null) throw new InvalidArgument("arg is null");
          if (!(arg instanceof Term) && !(arg instanceof Parameter)) {
              String err = arg.getClass().getName();
              err = err.concat(" is not a valid function argument");
              throw new UnsupportedOperationException(err);
          }
  
          if (functionArgs == null) {
              functionArgs = new ArrayList<BELObject>();
              terms = new ArrayList<Term>();
              parameters = new ArrayList<Parameter>();
          }
          functionArgs.add(arg);
  
          if (arg instanceof Term) {
              terms.add((Term) arg);
          } else {
              parameters.add((Parameter) arg);
          }
      }
docs: Adds a function argument to the end of the function argument list.
  <p>
  The argument will be additionally added to the terms or parameters,
  depending on its type.
  </p>
  
  @param arg BEL object function argument
  @throws InvalidArgument Thrown if {@code arg} is null
  @throws UnsupportedOperationException Thrown if {@code arg} is not a
  {@link Term} or {@link Parameter}