May be:

```C
if (val != NULL)
  config->group = ...
```

?