Fix a bug in SslHandler where a ClassCastException is raised when non-ByteBuf message is passed

- Fixes #1828