Fix handling of JSON null, improve perf tiny bit