I try with a loop like that
// ArrayList tourists for (Tourist t : tourists) { if (t != null) { t.setId(idForm); } }
This is easy way to remove default null values from arraylist
tourists.removeAll(Arrays.asList(null));
otherwise String value "null" remove from arraylist
tourists.removeAll(Arrays.asList("null"));