Pass window.id through if not None

Slight behavior change. If someone had set window.id to [] or {}, id would become 'undefined'. Now it will be passed as is. This is not worth mentioning in the changelog.
Fixes #270