check to make sure param values are valid