and you can remove ``null !== $token``. ``null`` is not an instance of ``UsernamePasswordToken``