Add assertions to check handle coercions

In Node v0.11.13, calling `isNaN(handle)` or `handle+''`
causes a TypeError: Cannot convert object to primitive value

Works fine in Node 0.10