Use isinstance instead of directly comparing ObjC class types.