Is it possible to fix it some other way than with a specific istype check? Seems like a cop-out.