refactor Type handling (step towards method cache)