def safe_isnan(x):
    ':func:`numpy.isnan` for arbitrary types'
    if cbook.is_string_like(x):
        return False
    try: b = np.isnan(x)
    except NotImplementedError: return False
    except TypeError: return False
    else: return b