From ESOUI Wiki
This function returns true if the player has a bank Bag other than the Guild Bank open (even if they're on the "deposit" tab of the menu rather than the "withdraw" tab). It returns false otherwise.
if IsBankOpen() then d("Saving your money won't earn you interest in Tamriel, but guards can only confiscate the gold you have on your person.") end