Fix exception if _sendData is called with data == nil