data undefined check