Use 'parent_xblock is None' rather than 'not parent_xblock'