https://github.com/apple/swift-protobuf/blob/4782e2f11d52e87cff85518126695898695712d8/Sources/SwiftProtobuf/Message%2BJSONAdditions.swift#L35 I just had a Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value The function is throwing couldn't you throw a nil error instead of force-unwrap