fix exception when Seq(null) passed