title: How to deal with null values when serializing arrays with protobuf-net?
body: <p>The following statement fails with <code>NullReferenceException</code>:</p>
  
  <pre><code>TypeModel.Create().DeepClone(new string[1]);
  </code></pre>
  
  <p>Examining the source code reveals that the exception is thrown on purpose, implying that <code>null</code> values in an array violate the protocol buffers spec (makes sense, <code>null</code> is not a repetition of any value).</p>
  
  <p>OK, the spec is right, but what should we do if there is still a null value in a collection? Is there a solution, besides making sure no <code>null</code> values ever creep into our collections ?</p>
  
  <p>Thanks.</p>