Better checking for session variable