Pay off Mortgage or Invest?

My grandmother died, and we just received about $20,000. Should we use the money to pay down our mortgage, or should we invest it?