check if a group has members before looping through the items