Why null is not equal to null? [duplicate]
Try to use isJsonNull method:
provides check for verifying if this element represents a null value or not.
if (bodyObj.get("entityIri").isJsonNull()) { ...}
Of course, you need to check whether bodyObj.get("entityIri")
is not null
before. I did not add it statement to make statement clear.