def clean_rec(rec):
    """
    replaces empty strings with 'None' so that a NULL will be inserted instead of ''
    """
    for i in range(len(rec)):
        if rec[i] == '':
            rec[i] = None
    return rec