In case it helps someone else, I'm adding my experience to the first topic googling the message found.
I was getting it on compile of HTML5. The problem was a link that had somehow gotten a strange ID (possibly a legacy from Robohelp conversion weirdness). In this case id="a1"". Removing the id entirely fixed the compile issue, but I assume you could probably just change the id to something valid if you need it.
It didn't cause any problems in HTML Help (CHM) output or in Webhelp, but failed with the "Object Reference" error for HTML5.
CORRECTION: it does cause a problem in HTML Help and Webhelp. The significant factors are:
1) a MasterPage is attached to the target being build.
2) a weird id such as id="a1"" appears in the topic code.
I'll submit a bug report to Madcap in the hopes of getting better error messages, or at least more diagnostic information in future.