Adds check for datachanel state before sending data.