Sort of. We can't make a contract to do something that would otherwise be illegal. A very simple example is that I cannot put into a rental lease that I can evict a tenant in 5 days. That would be in conflict with the law that says I must go through a 30 day process. Even if I put it in a contract and you sign it, you can still sue me for not going through the 30 day process.