def METHOD_NAME(model, field):
    print "Checking NULL values", model._meta.db_table+"."+field.column
    sql = "SELECT x.%s,x.%s FROM %s as x WHERE x.%s IS NULL" % (model._meta.pk.column, field.column, model._meta.db_table, field.column)
    cursor.execute(sql)
    rows = cursor.fetchall()
    if len(rows) == 0:
        print "    OK"
    else:
        print "    ERROR, found", len(rows), "NULL rows"
        for row in rows[0:20]:
            print "   ", row
        print "    Use the following SQL to debug:"
        print sql