Fix isEqualTo type comparision

(cherry picked from commit e38f7f9f73f1f030c1f37136118b37d02678d035)
Merge pull request #1478 from Zentyal/scabrero/core-fix-type-comparision

Fix isEqualTo type comparision