def extract_extension(filename):
    """

    >>> extract_extension('.txt')
    >>> extract_extension(None)
    >>> extract_extension('abc.txt')
    'txt'
    >>> extract_extension('a.html')
    'html'

    :param filename: file path
    :return: extension
    """
    try:
        dot_p = filename.rindex('.')
        if dot_p > 0:
            return filename[dot_p + 1:]
    except:
        pass
    return None
