Typecast user group (proper way)

### What does it do ?

Typecast user group ID earlier (before adding value to store) to make sure "strict search" works correctly (follow up of PR #11975)

### Why is it needed ?

After PR #11975, if you add a new user group to the user, the user group ID is added as a string in the grid store.
If you try to add the same user group (without saving), the group is added twice, since we are trying to search an integer ID (while the store got a string).

### Related issue(s)/PR(s)

* #11975