public function add($value) { if (!$this->acceptsType($value)) { throw $this->doUnexpectedValueError($value); } return parent::add($value); }