If the Package is installed then
or similar should work I believe.
If it's not installed then you might use some error-handling, but I assume there is a way to first confirm that it is installed(?) before attempting to run it.
Added: Check first if the method is a Text or WindowCommand - then it will be called on either a View or Window object, etc.