Fix filtered aggregator

1) fix NPE when value or dimension is not presnet
2) fix #872 
3) Add more tests for boundary cases