How to check for 'not in' in if statements?

Ignore, the error is related to another function in side the HTML OUTPUT… The else thing works.