String equality check

The ClientDelivery.isValidMessage() uses == instead of equals(). This causes messages that are built using new JSONObject(json) to fail.