You can use the special SeSFindObj('object name') command to perform the check:

 if(SeSFindObj('Object Name'))
 {
      // Object is available
 }
 else
 {
      // Object is not available 
 }