title: How to validate a component path name in ColdFusion / Lucee
body: <p>this seems like a simple question but I couldn't find the answer.  If I have a component path "pathToComponent", how can I validate that it is valid?  Right now I am resorting to using try/catch, but surely there is a more elegant way?</p>
  
  <pre><code>boolean function isValidComponent( required string pathToComponent ){
  
      try{
          var metaData = getComponentMetaData( arguments.pathToComponent );
          return true;
      }
      catch( any e ){
          return false;
      }
  }
  </code></pre>
  
  <p>Thanks!</p>