Query for nonexisting values

I want to find items where a specific field is not existing. How can I do that with DQL?

Something like

fetch events
| filter myItem.nonexisting == null

A colleague pointed out the isNull function to me. The syntax is

fetch events
| filter isNull(myItem.nonexisting)

And this also works when the field does not exist.