         value: [K: V],
         keyEncoding: ProtoIntEncoding = .variable
     ) throws where V.RawValue == UInt32 {
+        guard !value.isEmpty else { return }
+
         try encode(tag: tag, value: value) { key, item in
             try encode(tag: 1, value: key, encoding: keyEncoding)
             try encode(tag: 2, value: item.rawValue, encoding: .variable)

     Encode a repeated `float` field.
     This method is distinct from the generic repeated `ProtoEncodable` one because floats can be packed.
     */
    public func encode(tag: UInt32, value: [Float]?, packed: Bool? = nil) throws {
        guard let value = value else { return }

        try encode(tag: tag, wireType: .fixed32, value: value, packed: packed) { item in
            try item.encode(to: self)

    }

    /** Encode a repeated `string` field */
    public func encode(tag: UInt32, value: [String]) throws {
        guard !value.isEmpty else { return }

        let key = ProtoWriter.makeFieldKey(tag: tag, wireType: .lengthDelimited)
        for item in value {
