Bug fix attempt #2 - do I really need to check the type?