fixed my previous edits - made sure the object whose class was being
checked was consistent.