filter doesn't work when methods are added to Object.prototype

`$filter("filter")([{"name":"foo"}], "foo")` will return `[]` if properties/methods are added to Object.prototype because the check isn't done as it should. 

This simple change fixes that.