def pd_isnan(val):
    """
    Utility function for identifying None or NaN (which are indistinguishable in pandas).

    Parameters
    ----------
    val : numeric
        value to test

    Returns
    -------
    bool
        True if val is a GDX encoded special value that maps to None or numpy.nan;
        False otherwise
    """
    return val is None or val != val