code: function isPromise(val, name) {
      name = name || 'Promise';
      return (!isEmpty(val) &&
          val.constructor &&
          val.constructor.name === name);
  }
docs: Is Promise
  Checks if value is a Promise.
  
  @param val the value to inspect.
  @param name optional constructor name for promise defaults to Promise.