Code had two different return types

IMHO it is better to return undefined than an false which is different from the object
being returned in the opposite case.