Check object identity instead of value equality when not primitive.