By using forEach here, you can't return early, and you have to loop through all 12 types every time, even if you find the one you want before that.  A for loop would be better here.  Or an array so you could use indexOf().

But really, I'd rather you just had a single integer representation for the types and never had to convert from string to integer.