Adding key value check