refactoring to always expect a value