KCModuleQML: Make sizeHint() check more robust
Actually check for the object we're using later.
This should fix some segfaults detected by sentry:
- https://errors-eval.kde.org/organizations/kde/issues/207/?project=8
- https://errors-eval.kde.org/organizations/kde/issues/209/?project=8
FIXED-IN: 5.100