title: if no item of a combobox is selected do semothing in Java Fx
body: <p>I am using JavaFX have a list of items in a combobox , when  a user trys to register i want that a condition cheks if he selected an item or not in that combo. i have tryed this but it doesent work , how to do it please .</p>
  
  <pre><code>public void ADDuser(ActionEvent event) {
      String username = usernametf.getText();
      String pass = passtf.getText();
      LocalDate datebirth = dateofbirth.getValue();
      String situation = situationcombobox.getSelectionModel().getSelectedItem().toString();
  
      if (!username.equals("") &amp;&amp;
          !pass.equals("") &amp;&amp;
          !datebirth.equals(null) &amp;&amp;
          !situation.equals(null)) {// situaion problem
              mainc.con.AdduserDatabase(username, pass, datebirth, situation, gender);        
              Alert alert = new Alert(AlertType.INFORMATION);
              alert.setTitle("Information Ajout");
              alert.setHeaderText(null);
              alert.setContentText("Ajout réussi merci " );
              alert.showAndWait();
              Stage stage = (Stage) btnadd.getScene().getWindow();
              stage.close();
          } else {
              System.out.println(situation);
              Alert alert = new Alert(AlertType.INFORMATION);
              alert.setTitle("Information Ajout");
              alert.setHeaderText(null);
              alert.setContentText("Please Fill All the fields ! " );
              alert.showAndWait();
          }
      }
  }
  </code></pre>