I think the intention behind the explicit "return undefined" lines was to make clear that this happens when there was an error. So feel free to leave them there. In the end it is a matter of taste I guess.