added validation when the data is not present