Fixed issue with null JSON values not being stored due to TypeError exception

Fixes issue #6.

THe fix checks if the value is not null and is of type 'object', if not it will create an empty array which will keep the desired behavior without throwing an exception.