If course, but there is little chance to borrow money without security at 1% as the mortgage interest is and it’s currently trivial to beat. There are literally savings accounts with interest rate over my mortgage interest, meaning there is a zero risk arbitrage opportunity.
Even if you don’t invest it, if you have other credit (car, credit cards) obviously paying those first is always a better choice too.