kastatsfavoritesmodel: Fix a crash
Seems like a regression introduced by b5ce9cb4
cc @mart
Cause of very common crash: https://crash-reports.kde.org/organizations/kde/issues/23450/?project=9&query=is%3Aunresolved&referrer=issue-stream&stream_index=3
We might want to remove keys whose entry are null, but let's fix the crash first.