Type guards do no affect values of type any
Adding test case
Addressing CR feedback