Properly checks all types

The TypeChecker in Scanner now checks correctly for all types.