You can use a guard to ensure your method parameters match certain preconditions: ...