You can also get the current account being used in the wallet using currentAccount().
If the return is null this means that the current account selected by the user is not connected.
To monitor events related to the current account, utilize the currentAccount event. Receiving a null value from this event indicates that the user's currently selected account is not connected.
If the event receive a null value this means that the current account selected by the user is not connected.