def trysplit(x, delimiter):
    """
    Function to split only if string, otherwise return x

    Parameters
    ----------
    x: anything, hopefully string

    delimiter: string

    Returns
    -------
    x: same type as parameter x
    """
    if isinstance(x, str):
        return(x.split(delimiter))
    else:
        return(x)