I would say in the call itself. Thus, you only check for zero in one place, not 5 places, if you call this function from 5 different points.
But this is not the right answer. It really depends on the function and what consequences it causes with a null argument.
source
share