parser/sdp: assign stream var only if session is not null

(cherry picked from commit 1cefc0c5f83eb4b7b6ffefc6ab383d7aae6de07f)