Rework check for number of parameters