I think you should just return `null` for non objects:

```js
function getOwnerWindow(thing) {
  if (!thing || typeof(thing) !== "object") return null;
  let fn = privateNS(thing).getOwnerWindow;
  return fn ? fn.apply(fn, [thing].concat(arguments)) : null;
}
```