title: Python error - TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
body: <p>I am trying to debug an existing script and got the below error when I run the script. <code>./check_tandbergvideo CE s 10.50.174.138</code>
  This script tries to check if an endpoint is registered or not registered and returns status.</p>
  
  <blockquote>
    <p>Traceback (most recent call last):  File "./check_tandbergvideo",
    line 156, in   main() File "./check_tandbergvideo", line 114,
    in main  EP = getXML(sys.argv[3],sys.argv[1]) File
    "./check_tandbergvideo", line 79, in getXML  H323Status =
    getElement(tree,xml2+"H323/"+xml2+"Gatekeeper/"+xml2+"Status")     +
    ". Errors: " +
    getElement(tree,xml2+"H323/"+xml2+"Gatekeeper/"+xml2+"Reason")<br>
    TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'</p>
  </blockquote>
  
  <p>Here is the part of code that throws the error.</p>
  
  <pre><code>if model == "CE":
    # SIPStatus =  getElement(tree,xml2+"SIP/"+xml2+"Registration/"+xml2+"Status") + ". Errors: " + getElement(tree,xml2+"SIP/"+xml2+"Registration/"+xml2+"Reason")
      SIPStatus =  str(getElement(tree,xml2+"SIP/"+xml2+"Profile/"+xml2+"Registration/"+xml2+"Status")) + ". Errors: " + str(getElement(tree,xml2+"SIP/"+xml2+"Profile/"+xml2+"Registration/"+xml2+"Reason"))
      H323Status = getElement(tree,xml2+"H323/"+xml2+"Gatekeeper/"+xml2+"Status") + ". Errors: " + getElement(tree,xml2+"H323/"+xml2+"Gatekeeper/"+xml2+"Reason")
      ReleaseKey =   getElement(tree,xml2+"SystemUnit/"+xml2+"Software/"+xml2+"ReleaseKey")
      EPModel = getElement(tree,xml2+"SystemUnit/"+xml2+"ProductId")
  SWVer =getElement(tree,xml2+"SystemUnit/"+xml2+"Software/"+xml2+"Version")
      else:
      badSyntax()
  EPData = {"Model":EPModel,"SIP":SIPStatus,"H323":H323Status,"RK":ReleaseKey,"SW":SWVer}
  return(EPData)
  </code></pre>
  
  <p>Could you please verify if the second line of the code H323 has correct syntax?</p>