Internal, get value from record

def _get_val(record, keys):
    '''
    Internal, get value from record
    '''
    data = record
    for key in keys:
        if key in data:
            data = data[key]
        else:
            return None
    return data