code: func (s *messageStoreImpl) CheckValid(message interface{}) bool {
  	s.lock.RLock()
  	defer s.lock.RUnlock()
  
  	for _, m := range s.messages {
  		if s.pol(message, m.data) == common.MessageInvalidated {
  			return false
  		}
  	}
  	return true
  }
docs: // Checks if message is valid for insertion to store