import re


def get_boolean(key, row):
    """Reads a boolean from a row."""
    if key in row and row[key]:
        value = row[key]
        regex = re.compile('(true|t|yes|y|1)', re.IGNORECASE)
        if regex.search(value):
            return True
        else:
            return False
    else:
        return None