hal: add NULL check for stream in

Add a null check for stream in to avoid crashes during
voice call recording and other use cases which involve
capture path.

CRs-Fixed: 2010691
Change-Id: Ifc23bb837804d9500a1b9c5164f79fa085b20a34
2 files changed