check if data returned by API is really JSON