Prefer name over type for determining the extension