null and undefined both mean approximately the same thing, just return whatever you feel like, right? if (myVar !== undefined && myVar !== null) {} is too verbose. Because consumers have to be defensive, it doesn’t matter whether I return null or undefined .