You'll have to check that `red` isn't none. You may also want to comment that you only can solve separable ode's at this point.