Proper use of exceptions during API validation

The Domain Core API now consistently uses exceptions for signaling
invalid input. Now throwing:

- NullPointerExceptions when a mandatory parameter is null.
- IllegalArgumentExceptions when a parameter has an invalid value (but
  isn't null).