Not to worry, this is a fine place to ask this kind of question. The answer to this question may be a bit advanced for a new user, but I'll do my best. The most reliable way I've found to accomplish something like this in Keyboard Maestro is with a function called CLIPBOARDSEED(). Here's an example macro that shows how to use it:
[Example] Check if String is Selected.kmmacros (3.6 KB)
To quote the KM wiki page on CLIPBOARDSEED():
The CLIPBOARDSEED() function returns an integer that changes when the clipboard changes. It will never repeat, so you can use this to test when the clipboard has changed.
To do this, we use two calculation variables: one before a Copy action, and one after, with each one set to CLIPBOARDSEED(). The Copy action is set to time out quickly, and to not end the macro if it doesn't actually end up copying anything. We then compare the two variables to see if their values are identical. If they are, we know that nothing was copied, and if they are different, we know that something was copied. In other words, we can use this to tell that whether a string was selected before the macro was run, since if it had been selected, it would have been copied, and CLIPBOARDSEED() would have changed accordingly.
This may be easier to understand in practice, so feel free to use that example macro and replace the purple placeholder action with the actions you want to use to change a selected string. If no string is selected, the macro will show a "No string selected!" message as you described. Good luck, and feel free to ask more questions if there's anything you want to know more about.