Refactored to make ResolveType more legible. Magic string as constant.