What would be the right way to proceed? Do I add another isinstance call, or put the whole thing under a try except block and let user.has_perms throw an exception in case it is not an iterable?