title: data consistency check : TypeError: argument of type 'NoneType' is not iterable
body: <p>so basically i am writing a some codes to cross check if my data is consistent. 
  I have written the below code but it has been showing TypeError: argument of type 'NoneType' is not iterable, i have tried changing the code quite a few times but still the same error comes out. Many thanks.</p>
  
  <pre><code>def checkdata(sex,school):
      if (sex == 'F') and ('boys school' in school) :
          return 'inconsistent'
      if (sex == 'M') and ('girls school' in school):
          return 'inconsistent'
      return
  
  
  def Dif() :
      with arcpy.da.UpdateCursor(DATA_SET,
          [sex, school]) as Cursor :
      for Cols in Cursor :
  
              Data = checkdata(Cols[0], Cols[1])
              if Data is not None:
                  print (Data, " ",Cols)
  </code></pre>