title: Symfony form, updating entity results in wrong argument type
body: <p>I have a form and I can create a new record in my database just fine.</p>
  
  <p>Now I would like to update this record with the same form so I am loading the form with my entity from the database.</p>
  
  <p>In this form there is a field called <code>modelBuild</code> and it is <code>nullable</code> and at the moment empty so when I load my form there is nothing in the field.</p>
  
  <p>Until there this is straightforward </p>
  
  <p>But now I try to update the database record so I send the form but the controller crashes at <code>$form-&gt;handleRequest($request);</code> saying:</p>
  
  <p><code>Expected argument of type "string", "NULL" given at property path "modelBuild".</code></p>
  
  <p>I don't understand because this field has always been <code>null</code> so why is it complaining now ?</p>
  
  <p>if I put something in the field then the form submits fine and the database is updated</p>
  
  <p>ENTITY FIELD:</p>
  
  <pre><code>/**
   * @var string|null
   *
   * @ORM\Column(name="model_build", type="string", length=100, nullable=true)
   */
  private $modelBuild;
  
  public function getModelBuild(): ?string
  {
      return $this-&gt;modelBuild;
  }
  
  public function setModelBuild(string $modelBuild): self
  {
      $this-&gt;modelBuild = $modelBuild;
  
      return $this;
  }
  </code></pre>
  
  <p>TYPE</p>
  
  <pre><code>-&gt;add('modelBuild', TextType::class, array(
    'label' =&gt; 'model build',
  ))
  </code></pre>
  
  <p>CONTROLLER:</p>
  
  <pre><code>function formHandle(Request $request) {
  
      if ($this-&gt;usermgmt-&gt;isLogged()) {
  
          $update = json_decode($request-&gt;request-&gt;get('update'));
  
              $uid = $update[1];
  
              // get user
              $user = $this-&gt;usermgmt-&gt;getUser();
  
              $itemEntity = $em-&gt;getRepository(Item::class)-&gt;findOneBy([
                  'uid' =&gt; $uid,
                  'user' =&gt; $user
              ]);
  
  
          // create form
          $form = $this-&gt;createForm(NewItemType::class, $itemEntity);
  
          // handle
          $form-&gt;handleRequest($request);
  
       // rest of controller....
  }
  </code></pre>