I have a jSonObject with key values pairs and i want to parse it to ContentValues. During the parse i want to detect wether the value is null, as you can see in the picture the value is null, but still it does not get catch by the if statement. Because it's a json and might be pasing null as string i tried to use value.equals("null") but neither it worked.

if ( value == null | value. equals("null") || tableField.getType() == FIELD_TYPE_NULL ) {
DO SOME CODE
}
What's wrong ?
value == null | value. equals("null")if value isnullnot a null string won'tvalue. equals("null")throw a NPE ? I think it should be written as"null".equals(value)value is null. when it should printvalue is, that's why i tried thevalue.equals("null")