Hello,
I was able to solve this issue on the website where this was happening, and it wasn't really tied to a module in my case. I used the module 'Devel' and 'Devel Entity Updates' to better debug.
I enabled 'Config Editor' under the Devel 'Configure' link. Under 'Config Editor', I looked at every configuration that starts with 'core.entity_view_mode', checking to see if they were missing any values. I noticed a single one where the targetEntityType was set to 'null'. I deleted this configuration, ran the DB script and it seemed to run with no issues.
I hope this helps!
Hello,
Have you found a solution to this? I'm having the same problem popping up on a site and haven't been able to figure out where it stems from.