def get_kanji_info(kanji, kanji_dic):
    """Returns grade (str) and stroke count (int) for kanji through lookup in kanji_dic"""
    try:
        grade = kanji_dic[kanji]['grade']
        stroke_count = kanji_dic[kanji]['stroke_count']
        stroke_count = int(stroke_count) if stroke_count.isdigit() else None 
        return grade, stroke_count
    except KeyError:
        return None, None