Refactor eq operator
Avoid creating unnecessary variable