Optimized getting default value of an enum type