Merge "Fix NPE at Keyboard"
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index 869d130..aa48292 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -366,15 +366,15 @@
     }
 
     public boolean isAlphaKeyboard() {
-        return mId.isAlphabetKeyboard();
+        return mId != null && mId.isAlphabetKeyboard();
     }
 
     public boolean isPhoneKeyboard() {
-        return mId.isPhoneKeyboard();
+        return mId != null && mId.isPhoneKeyboard();
     }
 
     public boolean isNumberKeyboard() {
-        return mId.isNumberKeyboard();
+        return mId != null && mId.isNumberKeyboard();
     }
 
     public void setSpaceKey(Key space) {