Checks if there is a current element after calls to rewind() or next().
public function valid() : bool { return $this->position < count($this->nodes); }