Why this check? I would just have the method break if you pass an invalid argument.