api: do not return Labels category when there are no labels (closes #651)