How to savely filter "definitions" from GraphQL children() result?

I would like to get all the material quantities from a Revit model. Using GraphQL I am retrieving all the children from a model/object using the children(select: []){} query.

My idea was to simply iterate through all the children and just sum up all the quantities I can find (from the materialQuantities property/object, if the child has it).
But I just noticed, that all “actual” windows, as well as their “definition” objects have materialQuantities and both are amongst the children. This somehow even makes sense, but it means I would also count the quantities of the definitions, which aren’t actually part of the building.

I could go through the model recursively via elements (which wouldn’t contain the definitions (which are saved under definition)), but wanted to avoid that effort, and simply receive ‘all children’.

Are there any other element types/categories which behave the same way? I know about windows and doors.
Most of the other elements do not have a definition, although any Revit family - like windows - could have one… Or not, but then why do windows?

Now… how can I savely recognize any definition object? Are they ALL of speckle_type Objects.BuiltElements.Revit.RevitElementType:Objects.BuiltElements.Revit.RevitSymbolElementType??

:slight_smile: