CBD-87: use better type check in cleanse()
CBD-87: use better type check in cleanse()

Change-Id: Ia0f1c4ed5b290eacbd3d25fdd9c8798d9a67e490
Reviewed-on: http://review.couchbase.org/17726
Reviewed-by: Ronnie Sun <06648be64f8fbc529d817d157ec32d385ea42f22@couchbase.com>
Tested-by: Steve Yen <ef850f73f7832052d3c6d9b5ddd3a1716d9a57f1@gmail.com>

membase/membase-cli,couchbaselabs/couchbase-cli,couchbaselabs/couchbase-cli,couchbaselabs/couchbase-cli,couchbase/couchbase-cli,membase/membase-cli,couchbase/couchbase-cli,membase/membase-cli