import re


def get_ext(path: str):
    """ Returns the file extension, otherwise return None """
    if type(path) != str:
        return None

    value_regex = re.compile("\.([\w\d]+?)$")
    matches = value_regex.search(path)
    return matches.group(1) if matches else None