Bug report
bool|null is accepted in an if condition if you use the nullsafe operator.
Code snippet that reproduces the problem
No error for line 13:
https://phpstan.org/r/6866ee85-dfc4-4b09-9b39-83861c2cdda6
Expected output
I expected the error Only booleans are allowed in an if condition, bool|null given.