title: Symfony2 DateTime null accept
body: <p>So, I want to be able send a null option to my DOB field.</p>
  
  <p>Here is my form builder:</p>
  
  <pre><code>-&gt;add('birthDate', DateType::class, array(
                  'widget' =&gt; 'single_text',
                  'format' =&gt; 'yyyy-MM-dd'))
  </code></pre>
  
  <p>And here is those field in my entity</p>
  
  <pre><code> /**
       * @ORM\Column(
       *     type="date",
       *     nullable=true
       * )
       * @JMS\Groups("single")
       *
       * @var \DateTime
       */
      protected $birthDate;
  </code></pre>
  
  <p>When I`m trying to send a null I got an error msg</p>
  
  <pre><code>Expected argument of type "DateTime", "NULL" given
  </code></pre>
  
  <p>any ideas?</p>
  
  <pre><code>CRITICAL - Uncaught PHP Exception Symfony\Component\PropertyAccess\Exception\InvalidArgumentException: "Expected argument of type "DateTime", "NULL" given" at /var/www/server.local/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php line 253 
  
  
  
    $type = $trace[$i]['args'][0];
      $type = is_object($type) ? get_class($type) : gettype($type);
      throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given', substr($message, $pos, strpos($message, ',', $pos) - $pos), $type));
  }
  </code></pre>
  
  <p>}</p>