Error handling for the case:
TypeError: autocompleteRef.current.addListener is not a function
Funcitonality works fine, but test cases failiing on feature implemented areas because autocompleteRef.current returning null initially, so added this error handling code
Error handling for the case: TypeError: autocompleteRef.current.addListener is not a function
Funcitonality works fine, but test cases failiing on feature implemented areas because autocompleteRef.current returning null initially, so added this error handling code