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

docstrings on these methods would be helpful