improve tests
jsonable if object or function and have toJSON()