Fix TypeError when parsing certain types of GeoTIFF image files