Replace type string with ParserType.

Proper and cached type resolving.