public static String parseStringObject(Object object) throws InvalidRpcDataException {

        if (object == null) {
            return null;
        }

        if (object instanceof String) {
            return (String) object;

        } else {
            throw new InvalidRpcDataException("Expected String, but got: " + object.getClass().getName());
        }
    }