function validate( n, p ) {
	if ( !isPositiveInteger( n ) ) {
		return new TypeError( format( 'invalid argument. First argument must be a positive integer. Value: `%s`.', p ) );
	}
	if ( !isProbability( p ) ) {
		return new TypeError( format( 'invalid argument. Second argument must be a probability. Value: `%s`.', p ) );
	}
	return null;
}
Validates parameters.

@private
@param {PositiveInteger} n - number of trials
@param {Probability} p - success probability
@returns {(Error|null)} error or null

@example
var err = validate( 10, 0.5 );
if ( err ) {
    throw err;
}