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

Collapse into `elif` and comment that you expect single model instance here.