Inheriting other people's tree problems is fairly common in home buying. Agents, sellers, and buyers typically don't have the knowledge to inspect trees. Oddly, a roof has to be inspected for leaks to satisfy a mortgage company but no inspection is required for the thing that can crush the roof and kill the occupants.
If you're considering a home purchase that involves nearby trees, contact an arborist. For about $150 you can have a tree inspected prior to purchase. The cost savings could reach into the thousands. By getting an arborist report prior to purchase you may be able to negotiate with the seller for any necessary tree work. If no work is required, you'll have some peace of mind for very little expense. Remember, when homeowners arrive at the decision to sell they tend to stop taking care of their trees.
Think before you buy.