$this->id is private property, better use $this->getId() so its consistent with check in previous line