import math


def is_missing(x):
    """
    Tests for missing values.

    Parameters
    ----------
    x : object
        The value to test.

    Returns
    -------
    out : boolean
        True if the value is missing.
    """
    if x is None:
        return True
    if isinstance(x, (str, dict, list)) and len(x) == 0:
        return True
    if isinstance(x, float) and math.isnan(x):
        return True
    return False