You should compare attribute types using Type.MetaType enum