How to compare type of an object in Python?,isinstance()