You are getting an "Object Reference" error when you are trying to add a Filter on to an attribute in Object Designer. The error message occurs when you drop the Filter list down in the "Attribute Filter Selector" window.
It’s due to some Filters in the database not having an Object that they are Filtered By. When you create a new Filter you will need to select what Object to Base the Filter on and what Object to Filter By.
You get this error message when the “Filter By” column in the database is NULL.
To fix, run the below script:
Please remember to always test any script on a test system before running it on live and to always have a fully restorable copy of your database taken.
update md_query_template set md_filter_class_type_guid = md_class_type_guid where md_type = '2' and md_filter_class_type_guid is NULL