Use isset to validate key.

sometimes $value is not an array, and array_key_exist throws warning too