title: (Python) AttributeError: 'NoneType' object has no attribute 'text'
body: <p>I'm getting the error below when I'm parsing the xml from the URL in the code. I won't post the XML because it's huge. The link is in the code below.</p>
  
  <p>ERROR:</p>
  
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-70-77e5e1b79ccc&gt; in &lt;module&gt;()
       11 
       12 for child in root.iter('Materia'):
  ---&gt; 13     if not child.find('EmentaMateria').text is None:
       14             ementa = child.find('EmentaMateria').text
       15 
  
  AttributeError: 'NoneType' object has no attribute 'text'
  </code></pre>
  
  <p>MY CODE:</p>
  
  <pre><code>url = 'http://legis.senado.leg.br/dadosabertos/senador/4988/autorias'
  import requests
  from xml.etree import ElementTree
  
  response = requests.get(url, stream=True)
  response.raw.decode_content = True
  
  tree = ElementTree.parse(response.raw)
  
  root = tree.getroot()
  
  for child in root.iter('Materia'):
      if child.find('EmentaMateria').text is not None:
              ementa = child.find('EmentaMateria').text
  
      for child_IdMateria in child.findall('IdentificacaoMateria'):
          anoMateria = child_IdMateria.find('AnoMateria').text
          materia = child_IdMateria.find('NumeroMateria').text
          siglaMateria = child_IdMateria.find('SiglaSubtipoMateria').text
  
  
  
      print('Ano = '+anoMateria+' | Numero Materia = '+materia+' | tipo = '+siglaMateria+' | '+ementa)
  </code></pre>
  
  <p>What I'm overlooking here?
  Thanks</p>