I get a TypeError: Cannot read property 'val' of undefined when i try to send notification with Frebase : So here us my error;

TypeError: Cannot read property 'val' of undefined
    at exports.sendNotification.functions.database.ref.onWrite (/user_code/index.js:14:19)
    at Object.<anonymous> (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:112:27)
    at next (native)
    at /user_code/node_modules/firebase-functions/lib/cloud-functions.js:28:71
    at __awaiter (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:24:12)
    at cloudFunction (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:82:36)
    at /var/tmp/worker/worker.js:728:24
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)

and here is my code:

exports.sendNotification = functions.database.ref('/notifications/{user_id}/{notification_id}').onWrite((change, context) => {

  const user_id = context.params.user_id;
  const notification = context.params.notification;

  console.log('We have a notification to send to : ', user_id);

  if(!context.data.val()){
    return console.log('A notification has been deleted from the database:', notification_id);
  }

  const deviceToken = admin.database().ref(`/Users/${user_id}/deviceToken`).once('value');

  return deviceToken.then(result => {

    const token_id = result.val();

    const payload = {
      notification: {
        title : "Friend Request",
        body : "You've receieved a new Friend Request",
        icon : "default"
      }
    };

    return admin.messaging().sendToDevice(token_id, payload).then(response => {

      console.log('This is the notification Feature');

    });

  });



});