determine if references are broken

Using Solidworks 2020 API what would be the way to determine if a component in an assembly or a drawing had a broken reference? I am not asking for code, just a pointer to the correct method(s) that I can use to determine? I basically need a Go/NoGo status (All OK/Something's wrong) with the references. I need it for all three filetypes: SLDASM, SLDPRT, SLDDRW.

SolidworksApi/macros