isinstance works too so I switched it.