0 should be tested as an input. IMO its fine to replace this -1 input. But you could add another case as well.