Modified check for session data.