Fixes instanceof Object statements for objects from other windows and iFrames. (#2631)
Fixes instanceof Object statements for objects from other windows and iFrames. (#2631)

* Replaces instanceof Object checks with typeof to prevent cross tab issues.

* Adds missing space.

yotamberk/vis,marcortw/vis,yotamberk/vis,marcortw/vis