Home Inspection
check ASHI.org for all the certified inspectors
for new home :- get it inspected two times , one before drywall and one before closing
if possible get a structural inspection done
all these inspection usually cost around $300
get a raddon test done usually cost around $50
for used home get a reputed real estate agent who knows the area very well.