Add `distinct` method for Model.