replaced empty string with null as after reading Sergio's comment in the forum realised it's ok to have null values in the structure as it is not part of the list
as a result of previous changes, now have 11 failures in my JUnit tests. Replaced .equals(null) with == null. should fix some of the failures