diff --git a/src/org/openstreetmap/josm/tools/I18n.java b/src/org/openstreetmap/josm/tools/I18n.java
index 03aaf9a..03d5daf 100644
--- a/src/org/openstreetmap/josm/tools/I18n.java
+++ b/src/org/openstreetmap/josm/tools/I18n.java
@@ -146,6 +146,8 @@ public class I18n {
      * @see #trnc
      */
     public static final String tr(String text, Object... objects) {
+        if (text == null)
+            return null;
         return MessageFormat.format(gettext(text, null), objects);
     }
 
@@ -219,7 +221,10 @@ public class I18n {
      * @see #trnc
      */
     public static final String trn(String singularText, String pluralText, long n, Object... objects) {
-        return MessageFormat.format(gettextn(singularText, pluralText, null, n), objects);
+        String text = gettextn(singularText, pluralText, null, n);
+        if (text == null)
+            return null;
+        return MessageFormat.format(text, objects);
     }
 
     /**
@@ -246,7 +251,10 @@ public class I18n {
      * @see #trn
      */
     public static final String trnc(String context, String singularText, String pluralText, long n, Object... objects) {
-        return MessageFormat.format(gettextn(singularText, pluralText, context, n), objects);
+        String text = gettextn(singularText, pluralText, context, n);
+        if (text == null)
+            return null;
+        return MessageFormat.format(text, objects);
     }
 
     private static final String gettext(String text, String ctx, boolean lazy)
@@ -283,6 +291,8 @@ public class I18n {
 
     private static final String gettextn(String text, String plural, String ctx, long num)
     {
+        if (text == null)
+            return null;
         int i;
         if(ctx == null && text.startsWith("_:") && (i = text.indexOf("\n")) >= 0)
         {
