I don't think this is needed, what you need to check is the actual command line arguments provided by the user, have you really found a situation where pluginDir, Plugin or self.Status are undefined?