Use instanceof to avoid arbitrary content objects mismatch