fix error when attempting to json.parse empty body text