Cordova Ionic WebSql check insertId property

Hello guys is there any way to check if this property of insertId is exist or if not so i know that was update on db here is my code sample: I'm not javascript guru :d

      var promCustomer =  $cordovaSQLite.execute(db, selectCustomre, [
         /*values*/
      ]).then(function(s){
        if (s.rows.length <= 0){
           var customerChangePromise = $cordovaSQLite.execute(db, customerInsertQuery, [
                /*values*/
            ]);
        }else {
            var customerChangePromise =  $cordovaSQLite.execute(db, customerUpdateQuery, [
                 /*values*/
            ]);
        }
        customerChangePromise.then(function(s){
            app.Logger(s.insertId);
            //Check here if s.insertId is exists.
        },function(e){app.Logger(e)});
    },function(e){app.Logger(e)});