Check if item is object

ID may be number.

See https://bugs.dojotoolkit.org/ticket/18279