handle case when the JSON parsing could fail