def METHOD_NAME(self, v):
    """
    If this can be parsed as a number, ensures it is printed as
    an integer, otherwise return the string unchanged.
    Returns None for 0.
    """
    if v is None:
        return None
    try:
        num_value = float(v)
        if num_value:
            return num_value
    except ValueError:
        return v