Would it be better to do `getattr(xmodule, "children", [])`? (Note: this is an honest question. I don't know if this is better than what you have or not.)