But in a more general sense, that's the function of title insurance: to offload the risk associated with liens on the property that you may not have known about at the time of purchase, including mechanic's liens which is what I think you're referring to.