CM-16758: fix npe on invalid response from api

Prevents a NullPointerException when a non-deserializable response is received