At first you should look if Enemies.name is really decleared with a string or if it's empty (manual debuggin)
- first log Enemies.name before you use the uppercase
- after that log uppercase(Enemies.name)
maybe its not decleared and because of this it returns a NaN