add try/catch for stringify

In deeply nested object environments and user-defined environements (e.g. overwritten the "Node" class) the stringify method may fail with an exception. 

To avoid these issues I added a try/catch block around the main stringify stuff. It should gracefully default to "[Object]" in these cases where an exception is caught.