Click switch button if its not clicked

Hi all,

Any idea how can I click on a switch button only if the button is not yet clicked?

Here’s what the button looks like:

If the end goal is to ensure the switch is clicked, I would just use executejavascript and do something like: