It should be 

`if (!isset($this->places[$id]))`