Assert must have a message. Also we put input validation code at the top of the function.