If you feel like you’re stuck in a student loan black hole, such as in default, you might consider several options, including legal recourse. But is a lawyer the right way to resolve your debt woes?

Qualified student loan lawyers can analyze your debt troubles as well as fight on your behalf if you’re being sued. However, there may be other solutions to your problem that are free and don’t require a consultation, such as income-driven repayment, deferment and forbearance, consolidation or refinancing. If you need personalized assistance, lawyers may be a more affordable option than student loan debt relief companies, which charge an average of $613 for services you could get for free, according to an August 2016 NerdWallet survey. Whether or not you hire a lawyer, pay attention to costs and look for no-cost options and services first.

To help you figure out if a student loan lawyer could be the right choice, NerdWallet contacted two student loan attorneys — Adam Minsky in Boston and Stanley Tate in St. Louis — to find out when to seek legal advice and how to handle debt collectors, lawsuits and deceptive lending practices.

Stanley Tate

Tate: You should hire a student loan lawyer if one of two things is true: You’re being sued for a student loan or you’re lacking confidence in solving the student loan issue you’re facing and you want help. Having said that, if you’re being sued, you may not need to hire a student loan lawyer to defend you, but you should at least hire one for a consultation. That way you can know your rights, learn the litigation process and be better equipped to defend yourself.

What are the benefits of working with a student loan lawyer versus a student loan debt relief company?

Tate: There are but a few student loan lawyers nationwide. In my experience, those who call themselves student loan lawyers are both highly trained and highly experienced in solving student loan problems. That combination of training and experience allows a student loan lawyer to effectively and efficiently solve your problems.

Adam Minsky

Minsky: Attorneys are a regulated profession, overseen by state licensing boards (called the bar) and held to strict rules about confidentiality and obligations to serve their clients. In other words, attorneys are accountable to you and to their state bar. This provides you with a lot of protections, whereas student loan consulting companies may be run by unlicensed professionals.

What can borrowers do if they think they are being deceived or wronged by their student loan lender or servicer?

Minsky: Borrowers should keep records of communications with their student loan lender or servicer, since they might need that later. If they feel like something went wrong, they can try to escalate the issue to management. Some lenders and servicers have a dispute resolution body that can address some common problems. For example, the U.S. Department of Education has an Ombudsman Group that can look into disputes between borrowers and servicers. Borrowers can also file a complaint with the federal Consumer Financial Protection Bureau, which oversees many aspects of student loan servicing. Ultimately, if borrowers feel like they aren’t getting anywhere, they can contact an attorney.

What are the first steps a borrower should take if they are sued by a private lender, receive calls from debt collectors or are in default and not sure how to get out?

Tate: The first thing you should do when a debt collector calls about a student loan is demand verification of the debt. Don’t pay anything until you get written proof you owe the debt. Proof should come in the form of a promissory note and a document showing the collector has been authorized to collect upon the debt.

Minsky: If you are in collections or default, or if you have been sued, now is the time to find an attorney. You may have rights and legal options available to you, but you might also need to take certain steps in order to utilize those options and preserve your rights. This is especially true if you’ve been sued. If you need an attorney but you’re not sure where to start, you can try the National Association of Consumer Advocates, which is a national bar association of consumer rights attorneys, some of whom may handle student loan issues. You can also contact your state bar association for a referral.

A lawyer may be able to help if you are in default, but before it comes to that, consider how to take back control of your student loan payments. If you have federal loans and can’t afford to repay them with the standard 10-year plan, consider switching to an income-driven repayment plan. This plan caps payments at 10-20% of your discretionary income, which can make the monthly bill more affordable, but it extends the length of the loan term, so you’ll end up paying more in interest in the long run.

If you have private loans, student loan refinancing can help you get a lower interest rate on a new private loan, which means paying less in interest over the life of the loan. Use a student loan refinancing calculator to see how much you could save. You can refinance federal loans, too, but by turning them into private loans you’ll be sacrificing programs such as loan forgiveness and income-driven repayment plans.

Anna Helhoski is a staff writer at NerdWallet, a personal finance website. Email: anna@nerdwallet.com. Twitter: @AnnaHelhoski.

The article When to Consider a Student Loan Lawyer originally appeared on NerdWallet.