Check if data variable returns an empty list (firestore db)

Hi, I’m using AppgyVer’s native REST API integration and so far my attempts in error handling has been in vein.

Someone please breathe some wisdom in me, as to how errors are handled from a data variable?

For example, I’m making an ecom app and the orders list for a new user is always empty. I’m using the REST API direct integration to get the orders list, but I have no idea how to find if the response was empty or not… Am i missing something here? Because error handling seems too obvious to be a missing feature