All Elements of Category gives "bad" elements

Hello all,

Sorry for the poor title, I’m having a hard time describing this issue.

I’m trying to use the “All Elements of Category” component to get all the wall tags in my project, then get the text of those tags. However, it seems to be returning three “elements” that aren’t actually wall tags, which mess up the rest of my script. I think they’re family types or something, but I can’t quite tell from the displayed text.

In this image, it’s the first three items in the list that are breaking things. If I remove them from the list, the rest of the script works:

Can anyone tell me what these non-tag tags are, and how I can filter them out parametrically?

Thanks for the reply. Your last point is what I would like to do - however I’m trying to develop a script that works for several projects, and it isn’t always three “bad” tags - sometimes one, sometimes four, sometimes zero. I’d like to figure out what it is about these tags that breaks the text component so I can filter them out using a “smart” dynamo technique, instead of always excluding the first three items on the list.

OK, I found it. All of the “bad” tags are legend components, for whatever reason Dynamo can’t get text from those.

Is there a way I can remove Legend Components from my selection?

Edit: since this is separate from the original question, I’m going to make a new post. Thanks for your help erfajo.