Create Filter based on a category which doesn't have that parameter

Hi,
I’m trying to create view filters which includes several categories.
In Revit it’s possible to select all categories which contains the parameter ‘Keynote’ without any problems. Even the categories which are not used.

However, when I use the package Archilab and I add the category ‘Assemblies’ it gives an error. I think that’s because there are no assemblies in my test project.

So I want to have a script that creates a list of all categories of all elements that have that certain parameter (in my example the parameter ‘Keynote’), and based on this list, combined with a value of that parameter, it creates a view filter.