If you are talking about strings with just a bunch of spaces in you could used ( strtrim(string[, chars]) - Trim leading and trailing spaces or the characters passed to chars from string. ) and then check to see if it is an empty string.
I got that from this page :
https://wowpedia.fandom.com/wiki/Lua...ring_Functions