Early withdrawal from 401k to pay for mothers funeral can i put that down under the situations that may lower the penalty cost.

My mother passed away and i didnt have enough money to bury her so I cashed out my 401k early. i paid federal and state tax when i cashed out but was wondering if that counts as death under the exemptions.