Use instanceof for equals check