Use Object.prototype.toString instead of window.toString