checks if data is null
adds empty chunk catch