Check contents are not empty before access it