a suggestion you may want to try adding option 'y' so it can be like:

if var == "yes" || var == "y"