def convertValueOrNone(value, convert=int):
    """Convert a value to a type unless NoneType.

    Parameters
    ----------
    value : anything
        The value to possibly convert.
    convert : TYPE, optional
        The type for conversion.

    Returns
    -------
    convert type
        The converted value.
    """
    return value if value is None else convert(value)