code: function _gpfQueryInterface (objectInstance, interfaceDefinition, throwError) {
      var result = null;
      if (_gpfIsImplementedBy(objectInstance, interfaceDefinition)) {
          return objectInstance;
      } else if (_gpfIsImplementedBy(objectInstance, gpf.interfaces.IUnknown)) {
          result = objectInstance.queryInterface(interfaceDefinition);
      }
      if (null === result && (undefined === throwError || throwError)) {
          gpf.Error.interfaceExpected({
              name: _gpfGetClassDefinition(interfaceDefinition)._name
          });
      }
      return result;
  }
docs: Retrieve an object implementing the expected interface from an object.
  This is done in two tests:
  - Either the object implements the interface, it is returned
  - Or the object implements IUnknown, then queryInterface is used
  
  @param {Object} objectInstance object to inspect
  @param {gpf.interfaces.Interface} interfaceDefinition reference interface
  @param {Boolean} [throwError=true] throwError Throws an error if the interface is not found (otherwise, null
  is returned)
  @return {Object|null} Object implementing the interface or null