Made a change so that it uses the syntax:

    val = val or DEFAULT

instead of:

    if val is None:
        val = DEFAULT