Add the support of type assert expressions in type parsing which allows to process type assertions in the global scope. Fixes #1543.