You can probably get rid of isContain.  You'll know that it doesn't have the key when the value is null.