def strip(x):
    """Strip a string.

    Parameters
    ----------
    x : any
        A str object which is to be stripped. Anything else is returned as is.
    """
    if isinstance(x, str):
        return x.strip()
    return x