Add extensions for throwing exceptions for null parameters.