Validate the datatype

Don't accept a non-null datatype for clients who haven't
asked for it

Change-Id: I9ad2e222e66ce0edbc47ec0a728c712ea0538b60
Reviewed-on: http://review.couchbase.org/34932
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>