Redundant Error message in ObjectFind() function

 
If I am not sure whether or not the Object Name exist in the Objects List, I will use the ObjectFind() function. I assume that it is a purpose of the function.
 if(ObjectFind("test")!=-1)ObjectDelete("test");


However, if the Object name does not exist I get log error message: "object name passed to ObjectFind function is missing in the objects list". Why am I getting this redundant message "if" the very purpose of the function is to determine "if" the name exist and "if" not, return -1 only.

Is there any other way to check if the Object Name exists without getting this error message?

 
we'll check it. Thanx
 
we'll check it. Thanx

I should add Slawa, that any test by "if" function should not generate any log error message. That is why we have "if" function for. Only true or false should be result.
 
This message appears if you pass uninitialized or empty string as name
 
Slawa, I tried this.
Array[0]="";
.
.  //The Array[0] may or may not get written;
.

if(Array[0]!="" && ObjectFind(Array[0])!=-1)   
// gives error 4204 "object name passed to ObjectFind function is missing in the objects list"
 
Don't use empty string as name and You don't get error 4024

BTW "calculation of a logical expression is always completed, never early terminated." (quote from "MQL4: Syntax") ie empty string passed to ObjectFind
 
Don't use empty string as name and You don't get error 4024

BTW "calculation of a logical expression is always completed, never early terminated." (quote from "MQL4: Syntax") ie empty string passed to ObjectFind

That is nice Slawa,

But how do I determine if the string is empty or not if I cannot use logical expression?
 
   if(Array[0]!="")
     {
      if(ObjectFind(Array[0])!=-1) blah-blah-blah
     }