Add null pointer check and return JS null.
Not all types can handle nullptr, so let types to decide how to react
typo
Merge pull request #30 from infosia/null_type_check

Fix: Let types to check null pointer