Changed if statements to use require() for checking parameters.