Preventing string conversion in a comparison gives performance gains