Don't check output if NULL

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