code: function isInList(value, listOfValues, msg) {
      value = value.toLowerCase().trim();
      if (listOfValues.indexOf(value) === -1) {
          throw new Error(msg);
      }
  }
docs: This method validates if the value exists in the list of values
  @param value
  @param listOfValues
  @param msg is the error message that will be thrown when the value is not in the list