title: Debugging an unexpected null in my metatable script
body: <p>I've been playing with this metatable and this error is the hardest one to fix:</p>
  
  <pre class="lang-lua prettyprint-override"><code>local Check = {
      InvitedMembers = {
          John = "Allowed",
          Mary = "Allowed",
          Halley = "Allowed"
      }
  }
  local Filter = {
      __index = function(t,k)
          for i ,v in pairs(t.InvitedMembers) do
              if i ~= k then
                  error("You're not invited by us")
              elseif i == k then
                  return "This way"
              end
          end
      end
  }
  local ConnectFilter = setmetatable(Check,Filter)
  print(Check.InvitedMembers.Sans)
  </code></pre>
  
  <p>I tried to make a filter however this code is returning a <code>nil</code> value.</p>