diff --git a/xbanalysis/model/xba_compartment.py b/xbanalysis/model/xba_compartment.py
index d156c4c6e7f5e3d004bb490f869db05a4ae38bdf..d243910390f842acb803df27ad14c07e5be9896e 100644
--- a/xbanalysis/model/xba_compartment.py
+++ b/xbanalysis/model/xba_compartment.py
@@ -24,5 +24,5 @@ class XbaCompartment:
             attrs = sbmlxdf.extract_xml_attrs(s_compartment['xmlAnnotation'], ns=xml_rba_ns, token='density')
             if 'frac_gcdw' in attrs:
                 self.rba_frac_gcdw = float(attrs['frac_gcdw'])
-        if 'sboterm' in s_compartment:
+        if ('sboterm' in s_compartment) and (type(s_compartment['sboterm']) is str):
             self.sboterm = SboTerm(s_compartment['sboterm'])
diff --git a/xbanalysis/model/xba_parameter.py b/xbanalysis/model/xba_parameter.py
index 591dd81a36d77b94df6310ec774644aadcaccddb..b86a0c38fc2d8932c164cad181a636a1a0075475 100644
--- a/xbanalysis/model/xba_parameter.py
+++ b/xbanalysis/model/xba_parameter.py
@@ -13,5 +13,5 @@ class XbaParameter:
         self.value = s_parameter['value']
         self.constant = s_parameter['constant']
         self.units = s_parameter['units']
-        if 'sboterm' in s_parameter:
+        if ('sboterm' in s_parameter) and (type(s_parameter['sboterm']) is str):
             self.sboterm = SboTerm(s_parameter['sboterm'])