Fix: null object causes crash

If String object returns null, console.log crashes.

Similar to https://github.com/appcelerator/hyperloop-ios/issues/13 and https://github.com/appcelerator/hyperloop-windows/pull/24