Improved handling of nullable enums to add FlagsAttribute support