What about the following:
```
if ( ! $page instanceof Page ) {
    return true;
}
```
before even the $visualization object is created?