Added check for NULL item in JSON data retrieval.