data != undefined fix