def _is_dtype_type(arr_or_dtype, condition):
if arr_or_dtype is None:<EOL><INDENT>return condition(type(None))<EOL><DEDENT>if isinstance(arr_or_dtype, np.dtype):<EOL><INDENT>return condition(arr_or_dtype.type)<EOL><DEDENT>elif isinstance(arr_or_dtype, type):<EOL><INDENT>if issubclass(arr_or_dtype, (PandasExtensionDtype, ExtensionDtype)):<EOL><INDENT>arr_or_dtype = arr_or_dtype.type<EOL><DEDENT>return condition(np.dtype(arr_or_dtype).type)<EOL><DEDENT>elif arr_or_dtype is None:<EOL><INDENT>return condition(type(None))<EOL><DEDENT>if hasattr(arr_or_dtype, '<STR_LIT>'):<EOL><INDENT>arr_or_dtype = arr_or_dtype.dtype<EOL><DEDENT>elif is_list_like(arr_or_dtype):<EOL><INDENT>return condition(type(None))<EOL><DEDENT>try:<EOL><INDENT>tipo = pandas_dtype(arr_or_dtype).type<EOL><DEDENT>except (TypeError, ValueError, UnicodeEncodeError):<EOL><INDENT>if is_scalar(arr_or_dtype):<EOL><INDENT>return condition(type(None))<EOL><DEDENT>return False<EOL><DEDENT>return condition(tipo)<EOL>
Return a boolean if the condition is satisfied for the arr_or_dtype.

Parameters
----------
arr_or_dtype : array-like
    The array-like or dtype object whose dtype we want to extract.
condition : callable[Union[np.dtype, ExtensionDtypeType]]

Returns
-------
bool : if the condition is satisifed for the arr_or_dtype