diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp
index 42715f9..49784e3 100644
--- a/tools/aapt2/ResourceParser.cpp
+++ b/tools/aapt2/ResourceParser.cpp
@@ -981,12 +981,14 @@
     return false;
   }
 
-  std::optional<ResourceNamedTypeRef> parsed_type = ParseResourceNamedType(maybe_type.value());
-  if (!parsed_type) {
+  std::optional<ResourceNamedTypeRef> maybe_parsed_type =
+      ParseResourceNamedType(maybe_type.value());
+  if (!maybe_parsed_type) {
     diag->Error(DiagMessage(out_resource->source)
                 << "invalid resource type '" << maybe_type.value() << "' in <" << tag_name << ">");
     return false;
   }
+  auto parsed_type = maybe_parsed_type->ToResourceNamedType();
 
   std::optional<StringPiece> maybe_id_str = xml::FindNonEmptyAttribute(parser, "first-id");
   if (!maybe_id_str) {
@@ -1039,7 +1041,7 @@
       }
 
       ParsedResource& entry_res = out_resource->child_resources.emplace_back(ParsedResource{
-          .name = ResourceName{{}, *parsed_type, maybe_name.value().to_string()},
+          .name = ResourceName{{}, parsed_type, maybe_name.value().to_string()},
           .source = item_source,
           .comment = std::move(comment),
       });
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp
index 23f6c88..b4e79ca 100644
--- a/tools/aapt2/ResourceUtils.cpp
+++ b/tools/aapt2/ResourceUtils.cpp
@@ -40,6 +40,23 @@
 namespace aapt {
 namespace ResourceUtils {
 
+static std::optional<ResourceNamedType> ToResourceNamedType(const char16_t* type16,
+                                                            const char* type, size_t type_len) {
+  std::optional<ResourceNamedTypeRef> parsed_type;
+  if (type16) {
+    auto converted = util::Utf16ToUtf8(StringPiece16(type16, type_len));
+    parsed_type = ParseResourceNamedType(converted);
+  } else if (type) {
+    parsed_type = ParseResourceNamedType(StringPiece(type, type_len));
+  } else {
+    return {};
+  }
+  if (!parsed_type) {
+    return {};
+  }
+  return parsed_type->ToResourceNamedType();
+}
+
 std::optional<ResourceName> ToResourceName(const android::ResTable::resource_name& name_in) {
   // TODO: Remove this when ResTable and AssetManager(1) are removed from AAPT2
   ResourceName name_out;
@@ -50,20 +67,12 @@
   name_out.package =
       util::Utf16ToUtf8(StringPiece16(name_in.package, name_in.packageLen));
 
-  std::optional<ResourceNamedTypeRef> type;
-  if (name_in.type) {
-    type = ParseResourceNamedType(util::Utf16ToUtf8(StringPiece16(name_in.type, name_in.typeLen)));
-  } else if (name_in.type8) {
-    type = ParseResourceNamedType(StringPiece(name_in.type8, name_in.typeLen));
-  } else {
-    return {};
-  }
-
+  std::optional<ResourceNamedType> type =
+      ToResourceNamedType(name_in.type, name_in.name8, name_in.typeLen);
   if (!type) {
     return {};
   }
-
-  name_out.type = type->ToResourceNamedType();
+  name_out.type = *type;
 
   if (name_in.name) {
     name_out.entry =
@@ -84,21 +93,12 @@
 
   name_out.package = std::string(name_in.package, name_in.package_len);
 
-  std::optional<ResourceNamedTypeRef> type;
-  if (name_in.type16) {
-    type =
-        ParseResourceNamedType(util::Utf16ToUtf8(StringPiece16(name_in.type16, name_in.type_len)));
-  } else if (name_in.type) {
-    type = ParseResourceNamedType(StringPiece(name_in.type, name_in.type_len));
-  } else {
-    return {};
-  }
-
+  std::optional<ResourceNamedType> type =
+      ToResourceNamedType(name_in.type16, name_in.type, name_in.type_len);
   if (!type) {
     return {};
   }
-
-  name_out.type = type->ToResourceNamedType();
+  name_out.type = *type;
 
   if (name_in.entry16) {
     name_out.entry =
