&gt;If I need different behaviour between &quot;value not provided&quot; and &quot;there aren&#x27;t any of that thing&quot;, I would perform both checks (if x is None:&#x2F;if not x:).<p>They will both be true if x is None. What you probably want is actually:<p><pre><code>    if x is None:
</code></pre>
and<p><pre><code>    if len(x) == 0:</code></pre>