fix in express.session

without checking if "val" exists, it produces an error using express.