Realized that the base filter should return nil instead of an empty hash when converting to hash to make things work in es