Add `filter` method for Model.