code: static public function isValidReason($reason, $throw = true)
      {
          if (in_array($reason, static::getReasons(), true)) {
              return true;
          }
  
          if ($throw) {
              throw new InvalidArgumentException("Invalid stock adjustment reason.");
          }
  
          return false;
      }
docs: Returns whether the given reason is valid or not.
  
  @param string $reason
  @param bool $throw
  
  @return bool