code: function validateInput(inputName, input, acceptableValues, acceptableValueType) {
      let validInput = true;
      if (acceptableValueType == "range") {
          if (input < Math.min(...acceptableValues) || input > Math.max(...acceptableValues)) {
              validInput = false;
          }
      } else if (acceptableValueType == "set") {
          if (acceptableValues.indexOf(input) == -1) {
              validInput = false;
          }
      } else if (acceptableValueType == "type") {
          if (!typeof input == acceptableValues) {
              validInput = false;
          }
      }
      if (!validInput) {
          throw(`Invalid ${inputName} given, valid options are: ${acceptableValues}`);
      }
  }
docs: Function to ensure that variables passed to API are of the correct types and bounded by reasonable values.
  @param inputName: the name of the variable
  @param input: the value of the variable
  @param acceptableValues: parameter containing valid values for input to take
  @param acceptableValueType: a flag
  range means that the acceptableValues is a list containing a min and a max value
  set means that the acceptableValues is a list containing all acceptable values
  type means that the acceptableValues is a single string containing the type that input must be