@classmethod<EOL><INDENT>def is_dtype(cls, dtype):<DEDENT>
dtype = getattr(dtype, '<STR_LIT>', dtype)<EOL>if isinstance(dtype, (ABCSeries, ABCIndexClass,<EOL>ABCDataFrame, np.dtype)):<EOL><INDENT>return False<EOL><DEDENT>elif dtype is None:<EOL><INDENT>return False<EOL><DEDENT>elif isinstance(dtype, cls):<EOL><INDENT>return True<EOL><DEDENT>try:<EOL><INDENT>return cls.construct_from_string(dtype) is not None<EOL><DEDENT>except TypeError:<EOL><INDENT>return False<EOL><DEDENT>
Check if we match 'dtype'.

        Parameters
        ----------
        dtype : object
            The object to check.

        Returns
        -------
        is_dtype : bool

        Notes
        -----
        The default implementation is True if

        1. ``cls.construct_from_string(dtype)`` is an instance
           of ``cls``.
        2. ``dtype`` is an object and is an instance of ``cls``
        3. ``dtype`` has a ``dtype`` attribute, and any of the above
           conditions is true for ``dtype.dtype``.