public override object Convert(object value, Type type, IFormatProvider formatProvider)
        {
            if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable <>))
            {
                if (value == null)
                {
                    return(null);
                }

                Type underlyingType = type.GetGenericArguments()[0];
                return(Convert(value, underlyingType, formatProvider));
            }


            if (type == YogaValueType)
            {
                var res = YogaValueConverter.NormalizeYogaValue(value);
                if (res.HasValue)
                {
                    return(res.Value);
                }
            }

            if (value == null)
            {
                if (TypeConverter.TypeIsNullable(type))
                {
                    return(null);
                }
                throw new NotSupportedException($"Unable to convert null to '{type.FullName}'");
            }

            if (type == ColorType)
            {
                if (value is Color v)
                {
                    return(v);
                }
                var res = ColorConverter.FromJsValue(JsValue.FromObject(engine, value));
                if (res.HasValue)
                {
                    return(res.Value);
                }
            }
            else if (type == Vector2Type)
            {
                if (value is Vector2 v)
                {
                    return(v);
                }
                var res = Vector2Converter.FromJsValue(JsValue.FromObject(engine, value));
                if (res.HasValue)
                {
                    return(res.Value);
                }
            }
            else if (type == Vector4Type)
            {
                if (value is Vector4 v)
                {
                    return(v);
                }
                var res = Vector4Converter.FromJsValue(JsValue.FromObject(engine, value));
                if (res.HasValue)
                {
                    return(res.Value);
                }
            }
            else if (type.IsEnum && value is string s)
            {
                return(Enum.Parse(type, s, true));
            }

            return(base.Convert(value, type, formatProvider));
        }