Add ad-hoc typing checks for tagToEnum#