I'm not 100% sure the purposes of these checks serve but I beleive X-LIC-ERROR is an icaljs specific thing. Calling toString() on an icaljs freebusy property seems to mess up the formatting of the period string. This is likely a bug in icaljs but I was unable to track it down. Not calling toString() for the X-LIC-ERROR allows us to avoid it though. Note also that the same check is not in the async branch of parseString.
Bug 1783441 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I'm not 100% sure the purposes of these checks serve but I beleive X-LIC-ERROR is a libical specific thing. Calling toString() on an icaljs freebusy property seems to mess up the formatting of the period string. This is likely a bug in icaljs but I was unable to track it down. Not calling toString() for the X-LIC-ERROR allows us to avoid it though. Note also that the same check is not in the async branch of parseString.