title: Protobuf, MapStruct and null values
body: <p>Given this proto</p>
  <pre><code>option java_outer_classname = &quot;FooProto&quot;;
  message Foo {
      string bar = 1;
  }
  </code></pre>
  <p>This java class:</p>
  <pre><code>public class MyFoo {
      String bar;
  }
  </code></pre>
  <p>And this Mapper (using Mapstruct):</p>
  <pre><code>@Mapper
  public interface FooMapper() {
      FooProto.Foo toProtoFoo(MyFoo myFoo);
  }
  </code></pre>
  <p>When I have an instance of MyFoo with a null bar and I try to map it to the proto I get a NullPointerException.</p>
  <p>This is because the auto-generated code for the Mapper invokes an auto-generated method for the proto that looks like:</p>
  <pre><code>public Builder setBar(java.lang.String value) {
      if (value == null) {
          throw new NullPointerException();
      }
  
      bar_ = value;
      onChanged();
      return this;
  }
  </code></pre>
  <p>Is there any way of avoiding this problem? (that does not involve sanitizing MyFoo instance before mapping so that it has no null values)</p>