Checked for element === null or undefined on several occasions

... in order to prevent null exceptions sometimes thrown when navigating back to a page where the component was used (when ic-autocomplete was already open)