Even if you have debt, you should be taking full advantage of your employer 401k match if one is available to you. In almost every case you will come out ahead even if you withdraw the money early.
So many of my coworkers do not contribute to their 401K at all, which is literally just leaving free money on the table.