myObj.hasOwnProperty(myProp)
public boolean doesObjectContainField(Object object, String fieldName) { return Arrays.stream(object.getClass().getFields()) .anyMatch(f -> f.getName().equals(fieldName)); }