I do not really understand what we should do there? Should we just throw an exception? Or is this something that should be printed too?
Maybe you could say more about the concept of this method?

I think, since ErrorStatement is always valid, there is no need to throw an exception while checking it. Furthermore, a void function like checkType() can have an empty block as its body.

Correct, since you should always consider the ErrorStatement to be well-typed, you can just leave the body empty in this case.

The only other specified behaviour is that during code generation, an IllegalStateException should be thrown if trying to generate code for an ErrorStatement.

Other behaviour is not specified and, as far as I know, not tested.