Algolia doesn’t support filtering on null values or missing attributes[1]. The attribute must exist in the record to be used in a filter. The "Filter by attributes"[2] guide outlines methods to add the attribute to the record, but in short you must have the attribute in the record.
Links
[1]: Filter by null or missing attributes
[2]: Filter by attributes