I think that you are trying to evaluate trig function values for angles that are multiples of 90°. In such a case, "SOHCAHTOA" doesn't work.
What we can do is use the unit circle definition of sine and cosine. For example, if the angle is 90°, the point at the "top" of the circle, namely (0,1), is the same as (cos90°, sin90).
So, cos90° = 0 and sin90° = 1
Then, tan90° = (sin90°) / (cos90°) . So, tan90° is undefined
If the angle is 180°, then the leftmost point on the unit circle, (-1,0), is the same as (cos180°, sin180°).
So, cos180° = -1 and sin180° = 0
Then, tan180° = 0/(-1) = 0.