Alternatively, rather than using a type conversion function to convert the representation of whatever is wired to the "type" input, you can convert the representation of the input X to be the same representation as the type (which for an enum is one of U32, U16, or U8).
See attachment.