A home inspection and termite inspection would be well worth the money for knowing the condition of the property prior to closing. Your lender will require an appraisal prior to closing also. They will also order an appraisal which you will pay for, either up front or at closing. If the appraised value is lower than the purchase price you will have to come up with the difference in addition to the closing costs. If the appraisal shows the property is in a declining market, you may have to put down an additional 5% for the deal to close (depending on the type of financing you are getting - conventional, FHA).
With market conditions of most areas the way they are, and even with all the regulation and requirements in place and proposed changes to the real estate, mortgage, and appraisal industry, there are a lot of appraisers across the country that will inflate a value and/or provide misleading market analysis for the deal to close, to satisfy those with a direct or indirect vested interest in the outcome.