you should check that the definitions are public and throw an exception otherwise, instead of having a hard-to-debug error when calling the command and trying to get the service