Bugfix - unable to dump null object
new functions readText() and readJSON()