How to find out if I'm connected to bluetooth or not

I tried to make this so I could see if I’m able to connect up to my headphones. Basically when I press a button it will change a label that I have. When I clicked the button it changed the label to undefined. I am using the live test on the thunkable app. Is there any way to make this better and to see if the bluetooth is connected?

image