Yup it is, replace the entire if statement and _groups.GetOrAdd with 

```C#
_groups.TryAdd(groupName);
```

If the key is already there the tryadd will return false and not do anything, otherwise it will add it.