bug fix: add a function to handle 'NULL' from cjson