def convert_mat_value(val):
    """Convert values specified in materials elements_vars."""
    return {
        'values': [float(x) for x in val['values']],
        'min_value': float(val['min_value']) if val['min_value'] is not None else None,
        'max_value': float(val['max_value']) if val['max_value'] is not None else None,
    }