title: Test if a datepicker has a value
body: <p>I have a two datapickers, d1 and d2. 
  There is a filter function that should filter by d1 only, d2 only or both d1 and d2.</p>
  
  <pre><code>@FXML
  DatePicker d1;
  @FXML
  DatePicker d2;
  
  public void filter(){
    SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd");
  
    String st = ft.format(ft.parse(this.d1.getValue().toString())));
    String en = ft.format(ft.parse(this.d2.getValue().toString())));
  
    if(st == null &amp;&amp; en != null)
      filterbySt(d1);
    else
      filterbyEn(d2);
  }
  </code></pre>
  
  <p><strong>If d1 or d2 are not set, <em>I get a null pointer exception</em></strong></p>
  
  <p>How do I test if a datepicker has not been set ?</p>