G'day there Uwe.
That was all it was - take the quotes off of the TextWrapModes.NONE
The revised line in the script should be:
if (myTextFrames[j].contents == ""&& stroke == "0"&& color == "None"&& wrap === TextWrapModes.NONE){
I have also added an IDML version of the file used to test this script.
https://dl.dropboxusercontent.com/u/55743036/empty%20textbox%20test.id ml
Fixing empty textboxes has been a bugbear of mine for a while, and now the script is complete, I think I can safely move on!!!
Thank you all for your help.
Colin