`gsub!` can return nil, perform `upcase!` on different line.
Merge pull request #1288 from vipulnsward/fix-helper-gsub

`gsub!` can return nil, perform `upcase!` on different line.