do you mean checking if the value is "w" when not "r" and raised an exception if not?