def setDefaultVal(myDict, name, value):
    """ checks if a value exists in the dictionary and returns it.
    if there isn't a value for that property sets it to value and.

    :param myDict: a dictionary we what to update
    :param name: the name of the property
    :param value: the default vale if it is not already set
    :return: the value wither default or from myDict
    """
    if name in myDict:
        return myDict[name]
    else:
        myDict[name] = value
        return value