def is_dtype_equal(source, target):
try:<EOL><INDENT>source = _get_dtype(source)<EOL>target = _get_dtype(target)<EOL>return source == target<EOL><DEDENT>except (TypeError, AttributeError):<EOL><INDENT>return False<EOL><DEDENT>
Check if two dtypes are equal.

Parameters
----------
source : The first dtype to compare
target : The second dtype to compare

Returns
----------
boolean
    Whether or not the two dtypes are equal.

Examples
--------
>>> is_dtype_equal(int, float)
False
>>> is_dtype_equal("int", int)
True
>>> is_dtype_equal(object, "category")
False
>>> is_dtype_equal(CategoricalDtype(), "category")
True
>>> is_dtype_equal(DatetimeTZDtype(), "datetime64")
False