fix warnings
Summary: Don't call directly properties that may be undefined
Test Plan: Now discover still works without warnings in the GlobalDrawer
Reviewers: Kirigami, mart
Reviewed By: Kirigami, mart
Subscribers: plasma-devel
Tags: Kirigami
Differential Revision: https://phabricator.kde.org/D16375