Fix conditional and use blank to check for empty session