How do you avoid hidden surprises in older homes during renovation?

How do you avoid hidden surprises in older homes during renovation?