When data is null, we should not query any reference

This happen when you want to search a reference that does not have a value a.k.a `null`.