title: Exception to throw when instance variables are null
body: <p>I'm working on making a codebase complaint with a list of PMD rules. These include that you're not allowed to throw or catch <code>NullPointerException</code>s. I found this method which requires 2 instance variables to be non-null in order to run. It throws a <code>NullPointerException</code> otherwise:</p>
  
  <pre><code>public String build() {
  if (apiKey == null || url == null) {
      throw new NullPointerException(
              "Cannot build: API key and URL must be set");
  }
  </code></pre>
  
  <p>What should it be throwing instead? it seems to me that <code>NullPointerException</code> would be the bast call. The only other thing that comes to mind is <code>IllegalArgumentException</code>, but these aren't really arguments, so I don't think it really fits.</p>