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