def file_ext(v):
    """Split of the extension of a filename, without throwing an exception of there is no extension. Does not
    return the leading '.'
    :param v: """
    from os.path import splitext
    if not v:
        return None
    try:
        try:
            v = splitext(v)[1][1:]
        except TypeError:
            v = splitext(v.fspath)[1][1:]
        if v == '*':
            return None
        return v.lower() if v else None
    except IndexError:
        return None
