extension SetExtension on Set { void removeWhereType() { return removeWhere((E e) => e is T); } bool hasType() { return whereType().isNotEmpty; } T singleWhereType() { return whereType().single; } }