Move hasValue(…) from DocumentAccessor to BsonUtils. Fix typo in tests. See: #3590 Original pull request: #3591.