Would it work to see if what you get back is a list or a dict and then determine what to do?