Fix isEqualTo type comparision

(cherry picked from commit e38f7f9f73f1f030c1f37136118b37d02678d035)