fix incorrect handling of nil collections passed to constructor