refactor enum casts: prefer lexical cast default and cfg["x"].str()