I'm trying to show that if $X_n$ is a submartingale, with stopping times $M \leq N$, $P(N\leq k) =1$, then $E(X_{N} \mid \mathcal{F}_M) \geq X_M$.
The hint given is to use that, for any $A \in \mathcal{F}_M$, $$K_A := \begin{cases}M&\text{on }A\\ N&\text{on }A^c \end{cases},$$ is a stopping time.
I was able to show that $K_A$ is indeed a stopping time, but I'm not sure how to proceed, or how to use this stopping time
Hints: