Small change to not put empty values in the main document value map
Changed getAt(0) to first
Added econdition.@or-null attribute to make the condition an or between
  the specified condition and null