Fixed issue #595 about null in toList operator

just fixed the issue #595 about null values. I suppose that 'toList' does not need to handle the concurrent problem, so I use `ArrayList`.