public function valid() { $key = isset($this->items[$this->pos]) ? $this->items[$this->pos] : null; return $key !== null && $key !== false; }