Implemented general template to convert enums to strings