$page->isHomeOrErrorPage()
It's often required to check for the home and error page to stop certain actions. That's why there's a shortcut.
$page->isHomeOrErrorPage(): bool
Return type
bool
This method modifies the existing $page
object it is applied to and returns it again.