title: Possible to check if input (int or double) is null?
body: <p>I am trying to develop a project at my university with JavaFx, and I wonder if there is a way to check if integer or double is empty or null?</p>
  <p>E.g:</p>
  <pre><code>public void setNumber(int input) {
      this.gramsTobacco = gramsTobacco;
  }
  </code></pre>
  <p>Then I want to validate if the input actually is an integer. Is there any method for doing this?</p>
  <p>E.g:</p>
  <pre><code>public  void checkNumber(int num) {
      if (num is empty) {
          throw new .... &quot;Input must be a number&quot;
      }
  }
  </code></pre>