Fix crash in KisFavouriteResourceManager
Before this commit, a debug output could cause a crash. This commit fixes it by adding a check for null.