Why not simply doing something like this?
```
jsonError, ok := err.(*JSONError)
if !ok {
    jsonError = &JSONError
}
```