In shapefile_write_object, use PyArg_ParseTuple to check type of object instead of running our own test.