Fixed #14334 -- Query comparision now check for object types.

I'd let @timgraham decide that better.