Fixed compile error because I don't know how istype() works