Null check on out stream