Adding helper method to translate a stringname into the enum representation.