improve error reporting for type expressions that cannot be parsed