diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
index c8e0b93bf9bdf925b2bb16009957b2f8364ba2ca..602205b59673288bf019c58502c0b7dfffc2e473 100644
--- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
+++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
@@ -46,6 +46,7 @@ import java.util.Map;
 import java.util.Set;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 /**
  * Enrichment class for InputMethodManager to simplify interaction and add functionality.
@@ -329,7 +330,7 @@ public class RichInputMethodManager {
 
     @UsedForTesting
     static void forceSubtype(@Nonnull final InputMethodSubtype subtype) {
-        sForcedSubtypeForTesting = new RichInputMethodSubtype(subtype);
+        sForcedSubtypeForTesting = RichInputMethodSubtype.getRichInputMethodSubtype(subtype);
     }
 
     @Nonnull
@@ -488,8 +489,8 @@ public class RichInputMethodManager {
         return true;
     }
 
-    private void updateCurrentSubtype(@Nonnull final InputMethodSubtype subtype) {
-        mCurrentRichInputMethodSubtype = new RichInputMethodSubtype(subtype);
+    private void updateCurrentSubtype(@Nullable final InputMethodSubtype subtype) {
+        mCurrentRichInputMethodSubtype = RichInputMethodSubtype.getRichInputMethodSubtype(subtype);
     }
 
     private void updateShortcutIme() {
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java b/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java
index ea8d4a210884ed14d4754b691dfbf18e79c53e66..8734e592529570885bc538f362837173822ab330 100644
--- a/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java
+++ b/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java
@@ -30,6 +30,7 @@ import java.util.Arrays;
 import java.util.Locale;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 /**
  * Enrichment class for InputMethodSubtype to enable concurrent multi-lingual input.
@@ -147,6 +148,15 @@ public final class RichInputMethodSubtype {
         return SubtypeLocaleUtils.getKeyboardLayoutSetName(mSubtype);
     }
 
+    public static RichInputMethodSubtype getRichInputMethodSubtype(
+            @Nullable final InputMethodSubtype subtype) {
+        if (subtype == null) {
+            return getNoLanguageSubtype();
+        } else {
+            return new RichInputMethodSubtype(subtype);
+        }
+    }
+
     // Dummy no language QWERTY subtype. See {@link R.xml.method}.
     private static final int SUBTYPE_ID_OF_DUMMY_NO_LANGUAGE_SUBTYPE = 0xdde0bfd3;
     private static final String EXTRA_VALUE_OF_DUMMY_NO_LANGUAGE_SUBTYPE =
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index f04f093f0948f0c7a1a4655c0e9ae637ad0e1df0..ff0578d1333073386ff4909e12171aa79c3d0968 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -260,7 +260,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
         final KeyboardLayoutSet.Builder builder = new KeyboardLayoutSet.Builder(this, editorInfo);
         builder.setKeyboardGeometry(
                 SPELLCHECKER_DUMMY_KEYBOARD_WIDTH, SPELLCHECKER_DUMMY_KEYBOARD_HEIGHT);
-        builder.setSubtype(new RichInputMethodSubtype(subtype));
+        builder.setSubtype(RichInputMethodSubtype.getRichInputMethodSubtype(subtype));
         builder.setIsSpellChecker(true /* isSpellChecker */);
         builder.disableTouchPositionCorrectionData();
         return builder.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
index 7f828111d81af29cc1681aa1197fa3525b93fb8e..29787acc93d8e43997ce0cbab6881f4fc86a3e43 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
@@ -159,7 +159,7 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase {
         final int keyboardHeight = ResourceUtils.getDefaultKeyboardHeight(res);
         final Builder builder = new Builder(context, editorInfo);
         builder.setKeyboardGeometry(keyboardWidth, keyboardHeight)
-                .setSubtype(new RichInputMethodSubtype(subtype))
+                .setSubtype(RichInputMethodSubtype.getRichInputMethodSubtype(subtype))
                 .setVoiceInputKeyEnabled(voiceInputKeyEnabled)
                 .setLanguageSwitchKeyEnabled(languageSwitchKeyEnabled)
                 .setSplitLayoutEnabledByUser(splitLayoutEnabled);
diff --git a/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java b/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java
index 9c8e1651198f0ebf2a86ef0c24b899a247a5510a..d59890a96846e0660258755112dde5847af4832b 100644
--- a/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java
+++ b/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java
@@ -318,4 +318,11 @@ public class RichInputMethodSubtypeTests extends AndroidTestCase {
     public void testAdditionalSubtypeForSpacebarInFrench() {
         testsAdditionalSubtypesForSpacebar.runInLocale(mRes, Locale.FRENCH);
     }
+
+    public void testRichInputMethodSubtypeForNullInputMethodSubtype() {
+        RichInputMethodSubtype subtype = RichInputMethodSubtype.getRichInputMethodSubtype(null);
+        assertNotNull(subtype);
+        assertEquals("zz", subtype.getRawSubtype().getLocale());
+        assertEquals("keyboard", subtype.getRawSubtype().getMode());
+    }
 }