I use the `getType` method in order to create error messages like "Invalid statement name" for an input like this "{".

So the `getType` is not about being valid or not, but it is more on whether we are talking about a statement or a widget.

If you haven'r typed anything yet, I am assuming you want to type a statement.