Fixing missed null check for updating groups.