code: function _handlePromiseOrValue(promiseOrValue, cb) {
      if (promiseOrValue && promiseOrValue.then && typeof promiseOrValue.then === "function") {
          promiseOrValue
              .then(function(value) {
                  cb(null, value);
              })
              .catch(function(err) {
                  cb(err);
              });
      }  else {
          cb(null, promiseOrValue);
      }
  }
docs: Handle the callback invocation for Promises or synchronous values
  
  @param promiseOrValue - the Promise to be resolved or value to be returned
  @param cb - the callback to be invoked
  @returns undefined
  @private