A type safe equality operator using implicits