A corollary to this great answer, which I hope is apparent, is to get a lawyer who has experience with this sort of deal. A good one will be able to advise you through the whole process and tell you when they see red flags. Worst case you burn a few thousand dollars to prevent being taken for more. Think of it like insurance in that case.
To put it another way, it's usually cheaper to hire a lawyer to avoid a dispute than to resolve one.