pymapistore: improve some PyErr_SetString() error messages
pymapistore: (manually) check ranges of arguments
pymapistore: improve type check of arguments