If an object A is a GeometryCollection, its content can be accessed using : for geom in A: ... except if A is a GEOMETRYCOLLECTION EMPTY.