Or use collect
```scala
val temp = listValue collect {
  case mapValue: MapValue if mapValue.shouldFilter(key, filter, value) => {
    mapValue.execFiltering(context, into, key, filter, value)
    into.value
  }
  case v: Value if !v.isInstanceOf[MapValue] => v
}
```