title: I don't understand why my verification middleware behaves this way
body: <p>In the last comparison block, I am comparing if the user.rol_id is not equal to the id of the role, the strange thing is that it should be the opposite according to the logic, so, I appreciate any explanation of what is happening in that comparison.</p>
  
  <pre><code>export function verifyRol(rol: string){
      return async (req: Request, res: Response, next: NextFunction) =&gt; {
          const id = res.locals.jwtPayload.id;
          let user, rolModel;
          try {
              user = await User.findById(id);
              if (!user) return res.status(404).json({message: 'No se encuentra el usuario'});
  
              rolModel = await Rol.findOne({type_user: 1, name: rol});
              if (!rolModel) return res.status(404).json({message: 'No se encuentra el rol'});
  
  
              if (user.rol_id !== rolModel._id) {
                  console.log(':O');
                  next();
              }else {
                  return res.status(401).json({message: 'No se encuentra autorizado'});
              }
  
          } catch (error) {
              return res.status(401).json({message: 'No se encuentra autorizado'});
          }
      }
  }
  </code></pre>
  
  <p>I'm using TypeScript with NodeJS and MongoDB</p>