def getParentNames(person, population):
    """
    retrieves a persons parent names from the population dictionary if they exist
    returns either None or a new dictionary
    """
    parents = {}
    
    for name, data in population.items():
        if(name == person):
            motherName = data["mother"]
            fatherName = data["father"]
            if(motherName is None):
                return None
            else:
                parents["mother"] = motherName
                parents["father"] = fatherName
                break

    return parents