Check if selection exists

I don't think that's correct. A selection is not necessarily copied to the clipboard.

As for "emptying" the clipboard, see How to Do if Condition on Empty String of Clipboard.