Fixed bug with typeof null being 'object'