validating parameters used in method calls