//public Type GetChoiceType(string choiceSuffix)
        //{
        //    string suffix = choiceSuffix.ToUpperInvariant();

        //    if(!HasChoices) return null;

        //    return _choices
        //                .Where(cattr => cattr.TypeName.ToUpperInvariant() == suffix)
        //                .Select(cattr => cattr.Type)
        //                .FirstOrDefault(); 
        //}
   

        private static bool isAllowedNativeTypeForDataTypeValue(Type type)
        {
            // Special case, allow Nullable<enum>
            if (ReflectionHelper.IsNullableType(type))
                type = ReflectionHelper.GetNullableArgument(type);

            return type.IsEnum() ||
                    PrimitiveTypeConverter.CanConvert(type);
        }