Check for the session object before trying to use it
Check for the session object before trying to use it

This is a follow up to the change in 0601c4c.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt