Fixes gh-171. typeof null should be "object", not "null"

This also revealed the bug reported at https://github.com/espruino/Espruino/issues/172

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Merge pull request #173 from rwaldron/171

Fixes gh-171. typeof null should be "object", not "null"