Type Error: 'can't convert nil to string'

I think following changes will help users to avoid such problems. (done only for twitter)