Fixed a bug with json_escape where undefined objects return as "undefined"