Fixes Issue 8143 - Safe std.conv.to enum conversion
Merge pull request #897 from AndrejMitrovic/Fix_8143

Fix Issue 8143 - Safe std.conv.to enum conversion