Properly handle null values in streams.