Possible tweak:

```js
typeof o.valueOf === 'function' ...
```