fix filter isEmpty and test.