Added a null value check in the StreamPipeline