The IF is a javascript conditional statement. If something exists on the page => then do something, if not then do something else. You need to use regular expressions (regular-expression.info) to find out if the element is on the page, save it to a variable and then use logical IF to check for its existence.
If you want to check for text existence on a page, highlight the text you are searching for and then right click and choose selected text presence check. this will save all the necessary actions to check for the text.
http://screencast.com/t/bNLIeySJ6TI