How to filter some pattern in aggregate pipeline?

Yes correct it has to be and else not null will match -key as well. My bad.