def _retrieve_obj(name, shell):
    """Retrieve the NeXus object at the base of the command.

    This filters out invalid characters not caught by the regex.

    Parameters
    ----------
    name : str
        Name of the object to be retrieved.
    shell : InteractiveShell
        IPython shell containing the namespace to be searched.

    Returns
    -------
    NXobject
        The NeXus object at the base of the command.

    Raises
    ------
    ValueError
        If the object name contains a '('.
    """

    if '(' in name:
        raise ValueError()

    return eval(name, shell.user_ns)