'or not exists' in a multi-level variable?

I’m trying to make a multi-level variable and account for some missing data.

I have a ‘location’ tag is SOME of my entries. Ie, there is a location and then there are 1 or more devices. if there is 1 device, it wasn’t setup to push a location tag, if there are multiple it does.

So I’m making a Location variable for the tag ‘location’ and then in a second variable I’m do ‘where “location” =~ /^$Location$/’ which works great…

…except, this filters out everything that lacks a location.

So I’m trying to figure out how to add a ‘null’ or ‘not exists’ to that location lookup.

so, selection a location, get a hosts list with devices that are in that location. Select all and get everything, even those without a location tag.