Return after error in CheckASTVisitor.
Avoid type() call in PrintASTVisitor.