added check, whether data returned by API is really JSON