Pause and resume coroutine

Hi, im moving and object with a coroutine and I want pause and resume the coroutine.
How could do that?

One way is to make a loop that is conditioned by a bool

while (isPaused)
{
     yield return null;
}