No one has mentioned it, but the Easier to Ask For Forgiveness principle probably applies since I presume you'll be doing something with that integer:
def handle(self, *args, **kwargs):
try:
#Do some integer thing
except TypeError:
#Do some string thing
Of course if that integer thing is modifying the values in your list, maybe you should check first. Of course if you want to loop through args
and do something for integers and something else for strings:
def handle(self, *args, **kwargs):
for arg in args:
try:
#Do some integer thing
except TypeError:
#Do some string thing
Of course this is also assuming that no other operation in the try will throw a TypeError.