You can check a menu's status similarly to this:
Check Profile.kmmacros (5.7 KB)

Or you can just use a Select or Show a Menu Item action to select the profile you want to work with. If it's already open it will be brought to the front – if it's not open it will be opened.