import typing


def is_optional(field: typing.Any) -> bool:
    """Returns boolean describing if the provided `field` is optional."""
    return typing.get_origin(field) is typing.Union and type(None) in typing.get_args(
        field
    )