Use the exists command to test the existence of a command or procedure. It can be used to prevent runtime errors if you want to execute a script that may not be available.
For example, to find out if a script named test.mel that defines a procedure named test is in your script path, you can do this:
if (`exists test`) {
test;
} else {
warning "Test script not run";
}