code: public function hasField($name)
      {
          if ($this->fields === null) {
              $this->getFields();
          }
  
          return isset($this->fields[$name]);
      }
docs: @param string $name
  
  @return bool