add checking in KVMessage