Try to avoid segfaults on shape factory not found
Try to catch every pattern of KoShapeRegistry::instance()->value()
in the code and check the return pointer before using it.
It's a follow-up of https://phabricator.kde.org/D15679.
Reviewed By: boemann
Differential Revision: https://phabricator.kde.org/D15728