Fix crashes on Node stringify invalid ObjectIds, and because of no document
Merge pull request #7 from zaption/node-crashes

Fix crashes on Node (from stringifying invalid ObjectIds, and from no document global)