If any error happens while creating the Gstreamer pipeline and elements, guard against them being None.