better
```
return devmap["NAME"] if devmap["NAME"] && ! devmap["NAME"].empty? #or if you know that it cannot be empty, then only check for nil
```