compare type with name