Add Filter class
Refactor to extract a helper from #when and #when_not