fix(filter): throw error if not used with an array

Throw error if filter is not used with an array.

Closes #9992

BREAKING CHANGE: Previously, the filter was not applied if used with a non array.
Now, it throws an error.
sort of --- they can be in the same `it()` block as the first test you wrote --- testing that it throws a specific error, rather than the TypeError that will be thrown if we change the implementation of minerr