Additional checks on malloc output in data reader.