function ensureRefIsProvidedByChild(children, ref) {
  if (children && !isDOMElement(children) && !ref) {
    throw new Error(errorMessage);
  }
}
Raise an error if "children" is not a DOM Element and there is no ref provided to Waypoint

@param {?React.element} children
@param {?HTMLElement} ref
@return {undefined}