code: function isReactComponent(instance, error) {
              /* disable-eslint no-underscore-dangle */
              if (!(instance && instance.$$typeof)) {
                  if (error) {
                      throw new Error("Given component is not a react component ! Component :" + instance);
                  }
                  return false;
              }
              return true;
          }
docs: Checks instance is React Component or not.
  @param {Object} instance
  @param {boolean} error
  @returns {boolean}