Remove is_a? check when ignoring tables

Technically changes the API, as it will allow any object which responds
to `===`. Personally, I think this is more flexible.
Merge pull request #17697 from sgrif/sg-remove-is-a-check-when-ignoring-tables

Remove is_a? check when ignoring tables