from typing import get_origin
from typing import Union
from typing import get_args


def is_type_SpecificOptional(f_type) -> bool:
    """
    Returns true for types such as Optional[T], but not Optional, or T.
    """
    return get_origin(f_type) is not None and f_type.__origin__ == Union and get_args(f_type)[1]() is None