Comparing two variables with operator as argument