prevents errors from entering invalid addresses in search