Validation of method parameters.