controller if statement error with param

Hi,

are you sure its a string? just check with @state.class, and also try to print the value before the if (so as to confirm its not getting modified later on)

-NAYAK