def encodeField(value, encode_function=str):
    """
    Encodes a field value using encode_function
    :param value: 
    :param encode_function: 
    :return: 
    """
    if value is None:
        return None
    return encode_function(value)
