Check if bp groups component is active before looping groups.