title: What exception to throw when an important parameter/dependency is missing?
body: <p>Take this method</p>
  
  <pre><code>/**
   * @return List of group IDs the person belongs to
   *
   */
  public List&lt;String&gt; getGroups() {
      if (this.getId().equals("")) return null;
  }
  </code></pre>
  
  <p>I would like to throw exception instead returning null, what's the exception to throw when an important parameter/dependency has not been set?</p>