If Condition To Check Data Type In Python