fixes #335 - avoid NPE for enum with no values