Thanks for posting your question here.
My guess is that there is an object style you’re referencing that doesn’t exist in the current document. But I’m not sure about that.
So, just to clarify: Does this error only happen with object styles, or also paragraph styles? Does it happen in all documents or only this one? Does it happen all the time, or only occasionally? Have you tried restarting InDesign?
If it happens repeatedly with a specific document, I’ll be happy to take a closer look if you send me the document.