applyFilter also catches nullpointerexceptions