Added guards for malformatted type in reponses