How to find out if object has attributes?
<pre><code> if groupName.group == "None":
</code></pre>

<p>error:</p>

<pre><code>AttributeError: 'NoneType' object has no attribute 'group'
</code></pre>

<p>How to check if object has an attribute?</p>
