Fix places with undefined behavior
New API: IndexedType::IndexedType(const AbstractType::Ptr& type)
Places where we may call AbstractPtr::indexed with this being a nullptr.
Similar patches probably need to be applied to other language plugins
CCMAIL: kdevelop-devel@kde.org
CCBUG: 360707