code: function isCollection(object) {
      if (!object || typeof object !== 'object') {
          return false;
      }
      else if ('isCollection' in object) {
          diag.debug.assert(function () { return object.isCollection === Collection.prototype.isPrototypeOf(object); });
          return object.isCollection;
      }
      else {
          return Collection.prototype.isPrototypeOf(object);
      }
  }
docs: tests whether a given object is a Collection.
  
  @param {object} object to check.
  @return {boolean} whether object is a Collection.