I was checking logic for querying on non-values and noticed when using the mongo shell, it differentiates between undefined and null v
mongo
undefined
null
You should be using $exists to check for values that don't have the field.