Extend the typer to typecheck many more things

`BooleanType`, also a few other places.