Preventing error wehen message is an object

This method throwed "TypeError: Object #<Object> has no method 'substr'" when the message was an object.
Merge pull request #24 from torjue/patch-1

Preventing error when message is an object.