Legal advice should ideally be obtained before signing any agreement to identify risks and to structure the transaction appropriately.