Doing your homework before hiring someone can help you avoid costly problems and scams.