Fixed NullPointerException on random data

I have experienced a NullPointerException when I simly opened a session with telnet and sent some random data.
The draft parameter of the websocket implementation is still null when the getRole method is called.
Added a condition, the method is not called if the draft is null.