adds additional nullptr checks
These additional checks avoid a crash when using QAbstractItemModelTester on a KExtraColumnsProxyModel which has no sourceModel.
These additional checks avoid a crash when using QAbstractItemModelTester on a KExtraColumnsProxyModel which has no sourceModel.