getPodcast() !== null; } public function getPodcast(): ?Podcast { if ($this->id === null) { throw new RuntimeException('Podcast id must be set before getting associated podcast.'); } if (! $this->podcast instanceof Podcast) { $this->podcast = (new PodcastModel())->getPodcastByActorId($this->id); } return $this->podcast; } }