Allow passing null as extraData in jsonEncodeCollectionQuery

Signed-off-by: Tom Wright <tom@inflatablecookie.com>