def fileExtension(filename):
    """Returns file extension if exists
    
    Arguments:
        filename (str): file name
        
    Returns:
        str: file extension or None
    """
    
    if not isinstance(filename, str):
        return None
    
    fext = filename.split('.')
    if len(fext) < 2:
        return None
    else:
        return fext[-1]