function validate( N, K, n ) {
	if ( !isNonNegativeInteger( N ) ) {
		return new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', N ) );
	}
	if ( !isNonNegativeInteger( K ) ) {
		return new TypeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%s`.', K ) );
	}
	if ( !isNonNegativeInteger( n ) ) {
		return new TypeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%s`.', n ) );
	}
	if ( n > N ) {
		return new RangeError( format( 'invalid argument. Third argument must be less than or equal to the first argument. Value: `%u`.', n ) );
	}
	if ( K > N ) {
		return new RangeError( format( 'invalid argument. Second argument must be less than or equal to the first argument. Value: `%u`.', K ) );
	}
	return null;
}
Validates parameters.

@private
@param {NonNegativeInteger} N - population size
@param {NonNegativeInteger} K - subpopulation size
@param {NonNegativeInteger} n - number of draws
@returns {(Error|null)} error or null

@example
var err = validate( 1, 2, 3 );
if ( err ) {
    throw err;
}