Fix null pointer that was seen while investigating issue #161.  Fix by checking that map contains key first.

https://github.com/couchbase/couchbase-lite-android/issues/161