Fixes bug with string values being replaced by nil

Just realized there was a bug that wouldn't accept existing integers or whatever value that `empty?` threw a `NoMethodError` on. This should fix it