Added type checking in relational expressions