checks if there are facets before looping through them