Prevents exception if nil string is passed in...

I was having `NoMethodError` relating to `sub` not being found in Nil:NilClass so I decided to patch this for my purposes.

I'm not sure if this is the best way to handle this since I'm fairly new to Ruby.

I'm open to suggestions...

Thanks for the great utility!