diff --git a/helpers.go b/helpers.go index 5fdef5bf..3b4d01f1 100644 --- a/helpers.go +++ b/helpers.go @@ -148,6 +148,10 @@ func isZero(k interface{}) bool { } func isStructZero(v reflect.Value) bool { + if !v.IsValid() { + return true + } + for i := 0; i < v.NumField(); i++ { field := v.Field(i) switch field.Kind() {