function isPromise(value) {
  return value && (typeof value.then === 'function') && (typeof value.catch === 'function');
}
Test whether a value is a Promise via duck typing.
@param {*} value
@returns {boolean} Returns true when given value is an object
                   having functions `then` and `catch`.