do not use a try/except here, use ``str.find`` and check if the result is ``-1``