Remove panic in signing.go, rename serializeJSONChecked