how to compare type of an object in python?,isinstance()