code: public function validateValue(string $type, $value)
      {
          if (!isset($this->map[$type])) {
              throw new \InvalidArgumentException(sprintf('Variation type %s is not valid', $type));
          }
          $class = $this->map[$type];
  
          if (false === $class::validateValue($value)) {
              $stringType = in_array(gettype($value), ['string', 'float'], true) ? $value : gettype($value);
  
              throw new \InvalidArgumentException(sprintf('"%s" is not a valid value for type "%s"', $stringType, $type));
          }
      }
docs: @param string $type
  @param $value
  
  @throws \InvalidArgumentException