Ok, so am doing some Wordpress edits, and I writ a if statement.
Use get_the_title() instead of the_title().
get_the_title()
the_title()
Source: http://codex.wordpress.org/Function_Reference/get_the_title