[python] How to check type of object in Python?