[PATCH 2/3] mf: Add a helper to check for session shutdown state.