As of 2025, there is now a boolean isOpen property on the InfoWindow object.
isOpen
https://developers.google.com/maps/documentation/javascript/reference/info-window