Fixed some conditionals so equals is checked correctly in SemanticAnalyser.