No need for `else if`, just `if` as you throw exception in `if` before.