def checkOSExists(f):
    return os.path.exists(f)
use Python's os.exists to check if something exists or not
dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/suitability/toolboxes/scripts/NAMDownload.py/checkOSExists