Better error when unknown filetype is passed to Project.export_data
Currently if `filetype` is not part of `openpnm.io` module, it returns:
```bash
AttributeError: 'NoneType' object has no attribute 'export_data'
```
which is a bit obscure.
diff --git a/openpnm/utils/_project.py b/openpnm/utils/_project.py
index 59e736312..b22dcf083 100644
--- a/openpnm/utils/_project.py
+++ b/openpnm/utils/_project.py
@@ -594,7 +594,12 @@ class Project(list):
                     filetype = temp[filetype]
             else:
                 raise Exception('File type not given')
-
+        else:
+            temp2 = {"hdf5", "xdmf", "vtk", "pickle", "csv", "mat"}
+            if filetype in temp2:
+                print('filetype is supported')
+            else:
+                raise Exception('File type is not supported')
         # Fetch correct io class, using case insensitive look-up
         def igetattr(obj, attr):
             for a in dir(obj):
diff --git a/tests/unit/utils/ProjectTest.py b/tests/unit/utils/ProjectTest.py
index ae57ed1f6..487e27afa 100644
--- a/tests/unit/utils/ProjectTest.py
+++ b/tests/unit/utils/ProjectTest.py
@@ -383,6 +383,11 @@ class ProjectTest:
         self.proj.export_data(phases=self.phase1, filename=fname,
                               filetype='mat')
         os.remove(fname+'.mat')
+        
+        with pytest.raises(Exception):
+            self.proj.export_data(phases=self.phase1, filename=fname,
+                                  filetype='blah')
+            
 
     def test_inspect_pores_and_throats(self):
         df = self.proj.inspect_locations(element='pores', indices=[0, 2, 3])
['tests/unit/utils/ProjectTest.py', 'openpnm/utils/_project.py']