fix type comparison in __is__