title: Testing of existence of a repeated field in a protobuff message
body: <p>I have a google protobuf message:</p>
  
  <pre><code>message Foo {
    required int bar = 1;
  }
  </code></pre>
  
  <p>I know that in order to test the fields of message, we can use:</p>
  
  <pre><code>foo.bar = 1
  assert foo.HasField("bar")
  </code></pre>
  
  <p>However "HasField" doesn't work for repeated field types.
  How to test for existence of field for "repeated type" of fields?</p>
  
  <pre><code>message Foo {
    repeated int bar = 1;
  }
  </code></pre>