title: Lua script and redis - how to test for None value
body: <p>Below is my lua script:</p>
  
  <pre><code>     local ckid = redis.pcall('get',KEYS[1])
       local meta = redis.call('hgetall', ckid)
       return {ckid, meta}
  </code></pre>
  
  <p>if the key does not exits for the first call I would not like to execute the second.</p>
  
  <p>So...I don't what the return value is for None.  In python the return value would be None.</p>
  
  <pre><code>if ckid ~= '???????' then 
      local meta = redis.call('hgetall', ckid)
  else
       local meta = 'empty'
  retrun {ckid, meta}
  </code></pre>
  
  <p>So...how do I do this is lua?</p>
  
  <pre><code>     local ckid = redis.pcall('get',KEYS[1])
       if ckid ~= nil then
           local meta = redis.call('hgetall', ckid)
       else
           local meta = 'none'
           local ckid = 'none'
       end
  
       return {ckid, meta}
  </code></pre>
  
  <p>When using nil..</p>
  
  <pre><code>ResponseError: ERR Error running script (call to f_1400713412b0063a26eb0dc063f53a4e3be26380): user_script:12: Script attempted to access unexisting global variable 'meta'
  </code></pre>