if layer.wkbType() == QGis.WKBPolygon:
    print('Layer is a polygon layer')
if layer.wkbType() == QGis.WKBMultiPolygon:
    print('Layer is a multi-polygon layer')
if layer.wkbType() == 100:
    pass
how to get shapefile geometry type in PyQgis