Fix `Session.is_valid` when no previous session ID exists.