Yes, if you
already e-filed
and your return gets accepted, if the information you provided for a bank account that is for a closed or invalid account, the government will issue you a refund check via mail.
If your return hasn't already posted to the IRS's system, you can ask them to stop the direct deposit. You may call them toll-free at 1-800-829-1040, Monday - Friday, 7 a.m. - 7 p.m.
Please see FAQ (click on see
entire answer), for more information about closed/invalid account: https://ttlc.intuit.com/replies/3302459