private function validate($name): void {
    try {
      new ReflectionClass($name);
    } catch(ReflectionException $ex) {
      throw new InvalidArgumentException('Expected class name, but got [' . var_export($name, true) . '] instead');
    }
  }