fix for doing downcase on nil
Merge pull request #81 from pavelz/master

fix for doing downcase on nil