Comparing local variable with property

