[KCModuleInfo] Don't access KPluginInfo unless it's valid
systemsettings creates a KService for .desktop files with X-KDE-ServiceTypes=SystemSettingsExternalApp, in such cases there is no actual module, it just launches an external app, so IIUC there is no valid metadata and that is why constructing a KPluginInfo from that KService fails, stepping into the code with gdb confirms this.
It makes sense to not access the KPluginInfo private member of KCModuleInfo unless it is valid, so that service(), which is used by some users of the class to check whether the KCModuleInfo object is valid or not, doesn't cause a crash.