Nice catch! I'll put

    var rawClaimedEmail = session.getClaimedEmail(req) || "";
    var claimedEmail = rawClaimed.toLowerCase();