Check type of StrEnum value in __str__

Even though StrEnum is an Enum with str mixin, the value is still not
guaranteed to be a str. Verify its type as part of __str__.

Change-Id: Ifdc992ecf320a6f8b07b656d38974e8246a7c9e9
Reviewed-on: https://fuchsia-review.googlesource.com/c/antlion/+/887877
Fuchsia-Auto-Submit: Sam Balana <sbalana@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Reviewed-by: Jonathan Chang <jnchang@google.com>
diff --git a/packages/antlion/typing.py b/packages/antlion/typing.py
index 435c68d..24f1a0e 100644
--- a/packages/antlion/typing.py
+++ b/packages/antlion/typing.py
@@ -22,6 +22,8 @@
 
 class StrEnum(str, Enum):
     def __str__(self) -> str:
+        if not isinstance(self.value, str):
+            raise TypeError(f"Expected a str, got {type(self.value)}")
         return self.value
 
     @classmethod