It's possible to get the layer geometry type without reading a feature.
ds = ogr.Open(your_input_file)
layer = ds.GetLayer()
layer_defn = layer.GetLayerDefn()
Behavior was changed in version 3.0 (and was the reason to bump version into 3). Documentation is in https://trac.osgeo.org/gdal/wiki/rfc73_proj6_wkt2_srsbarn.
For getting the old behavior with GDAL 3 use
You can do that with ogr2ogr, both on Python and on the command line. You first need to create a virtual OGR datset with your two shapefiles, points.shp and grid.shp, which you'll describe as a file, let's call it data.vrt:
because data source parsing depends of provider you have to:
QgsProviderRegistry.instance().decodeUri( layer.providerType(), layer.dataProvider().dataSourceUri() )
so in case of a file based provider you have
decoded = QgsProviderRegistry.instance().decodeUri( layer.providerType(), layer.dataProvider().dataSourceUri() )