make sure data returned is json