Improving filters to avois NPEs