Resolves PHP errors if a category group is empty