check for gid existence