diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java index e14b57dad..39381f3cb 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java @@ -490,7 +490,8 @@ public class AndroidAPIUtils { if (exist) { return ob.getValue().getAsString().replace("%", ""); } - if (ob.getValue().getAsString().equalsIgnoreCase(needed)) { + JsonElement val = ob.getValue(); + if (val != null && !val.isJsonNull() && ob.getValue().getAsString().equalsIgnoreCase(needed)) { exist = true; } }