title: Adding items to a list from a loop with conditions
body: <p>I'm trying to add some items to a list, but only if condition is true.
  My function is actually storing null data when condition is false.</p>
  
  <pre><code>hit_list = for {_mob, %{id: id}} &lt;- get_mob_list(state.mobs) do
    if condition do
      id
    end
  end
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[null, "2"]
  </code></pre>