[Utils] update pipe function to handle case when "glue" value is not needed