docs: function _prepareExtension(extension) {
      var ext = {};
  
      try {
          if ( ({}).toString.call(extension) === '[object Object]' ) {
              ext.userInfo = extension;
              ext = JSON.parse( JSON.stringify(ext).replace(/null/g, "\"\"") );
          } else {
              throw new Error('Invalid type of "extension" object.');
          }
      } catch (err) {
          Helpers.traceWarning(err.message);
      }
  
      return ext;
  }