[python] Checking if type == list in python