diff --git a/xml/convertLiquidFlowToMPL.py b/xml/convertLiquidFlowToMPL.py
index fafd7be36dc5172753078b77acd478f5f6fb8da5..2e97d79fcc67c69cdb83923f9ef84dace5bd4191 100755
--- a/xml/convertLiquidFlowToMPL.py
+++ b/xml/convertLiquidFlowToMPL.py
@@ -312,6 +312,8 @@ def removeMaterialProperty(root, property_type, property_name, phase,
     if p := readConstantPermeabilityTensorEntries(material_property):
         # Find parameter
         param = root.find("./parameters/parameter/[name='" + p + "']")
+        if param == None:
+            return
         if parameterUsesLocalCoordinateSystem(param):
             # Keep parameters with local coord systems as they are.
             removeXmlSubtree(material_property)