Add defensive checks to Styliser.

Issue DMDirc/Plugins#47
Merge pull request #63 from csmith/master

Add defensive checks to Styliser.