NPE fix Database
fix for querying views with include_docs when value is not a hash