Prevent error from showing by checking if any terms were returned for autocomplete