check class type before checking property equality in -isEqual implementations