diff --git a/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java b/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
index <HASH>..<HASH> 100644
--- a/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
+++ b/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
@@ -223,10 +223,14 @@ public class MolecularFormulaManipulator {
                 int count = formula.getIsotopeCount(isotope);
                 try {
                     IIsotope major = Isotopes.getInstance().getMajorIsotope(isotope.getSymbol());
-                    if (Objects.equals(isotope.getMassNumber(), major.getMassNumber()))
+                    if (isotope.getMassNumber() == null ||
+                            Objects.equals(isotope.getMassNumber(), major.getMassNumber()))
                         stringMF.append(isotope.getSymbol());
                     else
-                        stringMF.append("["+isotope.getMassNumber()+isotope.getSymbol()+"]");
+                        stringMF.append("[")
+                                .append(isotope.getMassNumber())
+                                .append(isotope.getSymbol())
+                                .append("]");
                 } catch (IOException e) {
                     e.printStackTrace();
                 }
Ensure we check for unset mass number
Propery chain appends