code: function validateAttribute(obj, attribute, validList, onCheck, onSuccessful) {
      if (obj.hasOwnProperty(attribute)) {
          obj[attribute] = obj[attribute].toLowerCase().trim();
          if (validList.indexOf(obj[attribute]) == -1) {
              onCheck();
          }
          onSuccessful();
      }
  }
docs: This helper function consolidates the validation checks for rate,pitch and volume. It will first
  check to see if the attribute is present and whether it's one of the following conditions:
  a) the value of the attribute is a valid value or
  b) the value does not exist in the list, but passes the onCheck function. A hook for additional checks.
  
  Upon passing the above checks, the onSuccessful function is called allowing the caller to do any additional work.
  
  @param obj The object that owns the attribute.
  @param attribute The attribute name to check. e.g., rate, pitch or volume.
  @param validList The list of value values that the attribute can be.
  @param onCheck A hook for additional checks if the value does not exist in the list.
  @param onSuccessful A hook to call when all validation checks succeed.