_createCheckThatThrows(check, errorString) {
    return (propertyName, value) => {
      if (!check(value)) {
        throw new Error(errorString);
      }
    };
  }
Create a check out of a callback. If the callback
returns false, the check will throw an error.