[server]: Don't scan output buffer if NULL

Change-Id: I88226b3c25f4a44b57a5a8060d19e08639f46323
Reviewed-on: http://review.couchbase.org/28280
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>