Wouldn’t it be better practice to use get_the_title(..) in this case? directly accessing the post object’s data member would bypass applying filters and enforcing protected and private settings, unless that’s explicitly desired.