sanitize type name before resolving it