string array content checking...?

 
Just wondering if there is any way of checking whether the contents of a single string variable or string array element has been assigned a value? A statement such as:

anyArray[10];
if (anyArray[6] == johnny) etc.etc

returns a "not initialized string in array" error. A 'Print(anyArray[6]);' command produces a "(NULL)" but I can't find any way of checking to see if a string array element (or string variable) has actually been assigned something. I've tried 'if (anyArray[6] == "")' , 'if (anyArray[6] == "NULL") and 'if (anyArray[6] == "(NULL)") but get the above mentioned error every time. Any ideas?
 
Just found an answer to my own question in the form of "StringLen()" - this returns 0 if the string has not yet been assigned a value.
 
NULL is just macro for 0. There is useless to compare some string with NULL. There is no way to determine exactly uninitialized string. You can analyze last error. see stdlib.mq4 it should be errors 4008 and 4009
 
Thanks for the info!
Reason: