Thanks Micheal. You're right, of course. In that case how about this:,

    var responseData = {
      client_id: accessToken.client_id,
      user_id:   accessToken.user_id
    };

    if (user) {
      responseData.display_name = user.display_name;
      responseData.photo_url    = user.photo_url;
    };

    res.json(responseData);