Add checks for malformed responses