This should be

    if max_ram:
        set_property_setting('max_ram', str(max_ram))