Changed to type safe equality check