Add support for enum as string. Closes #1