Add `filter_map` implementation