Keith -- isn't he retrieving the angle from an entity (an attribute) rather than setting it explicitly?
That's how I read it; maybe I'm wrong. It happens.
You are correct ...
However, either his attribite is not at 90 degrees or he has read the attribute angle from a list and approximated it in the variable.
Insert a block with an attribute at 90 degrees
Check it with this code
(= (cdr (assoc 50 (entget (car (nentsel))))) (* pi 0.5))
It will return T, however if the attribute is not at 90 deg, it will always return nil i.e. if it is at 90.0000001 or anything other than exactly 90 degrees it will return nil.
Use of a fuzz factor in this instance, as Kerry pointed out, will resolve the issue as can be evidenced in this code. Use the same attribute, but rotate it slightly ... say 90.01 deg
(equal (cdr (assoc 50 (entget (car (nentsel))))) (* pi 0.5) 0.01 )