Simplify validation by using case instead of seperate methods.
Thanks @caulagi (via exercism).