The null check should be done by the caller (if at all). Currently, a null will trigger the else() branch of the if()