Title Insurance
When you purchase real estate, you will usually also purchase what is known in New York as "Title Insurance", which insures against certain title defects, but not others.
If there may be a problem with your title, you should consult with an attorney knowledgeable about these matters as soon as possible.