const checkMaximum = (
  value: number,
  {
    max,
    exclusiveMax = false