yes, it depends on the situation
The other advantage for keeping the mortgage is the risk management. Why not let the bank share some risk and keep the money liquid in case of emergency?
In my situation, I would keep the mortgage as high as I am comfortable with.
