Fix issue when loading a struct value with an expecting type of typeof(object)