Fixes crash caused by not checking the data length which comes from the server, when it's empty app crashes