In many places in my code, I have checks similar to the one below. It's very verbose, and ugly. Is there is better way? FYI, I'm using Lodash in all my projects, so I have access to that powerful library.
if (myAssessments[orderId].report &&
    myAssessments[orderId].report[categoryProductCode] &&
    myAssessments[orderId].report[categoryProductCode].categories &&
    myAssessments[orderId].report[categoryProductCode].categories[comment.categoryId]) {
    // Do something related to
    // myAssessments[orderId].report[categoryProductCode].categories[comment.categoryId]
}
 
     
     
     
     
    