def optional_instance_of(cls):<EOL>
return attr.validators.optional(attr.validators.instance_of(cls))<EOL>
Return an validator to determine whether an input is an optional instance of a class.

:return: A validator to determine optional instance membership.
:rtype: :class:`~attr.validators._OptionalValidator`