Investment grade refers to the highest quality of debt available, and usually means the bond has little risk of default.
Determining a bond’s credit rating is typically handled by ratings agencies, which is far from a perfect process. Ratings agencies like Moody’s and S&P notoriously failed to rate mortgage backed securities as high risk in the months/years leading into the 2008 financial crisis, instead keeping them as investment grade even as the crisis took hold.
An investor should determine the creditworthiness of the issuing company or the security through their own due diligence, above and beyond what the credit rating is.
What is a Credit Rating?
What Happens if I Don’t Diversify my Portfolio Sufficiently?
What are Some Strategies for Diversifying a Portfolio?