In looping through a beautiful soup object sometimes an element exists in one iteration but not the next. As I am also extracting the text with a chain of .text afterwards,