Currently we have some very nice unused code, Filter which would do a good job of validating filter params. It's not currently in use right now but would be with a small change here
The reason is that the Filter class doesn't pass it's filter attributes into the Query class and therefore the values get lost silently. This test can be easily modified to see what's happening. Modifying the filter class, probably with an attribute could resolve the issue.