CollectionResult objects are returned by WGA.app().query() as well as WGA.nav().children() and others.
We now implemented a new utility method
CollectionResult.contains(context)
This method is especially useful for filters.
Sample:
<tml:foreach item="_docs"
filter="WGA.nav().relationGroupTargets('my-relation').contains(some_target)">