When using Null Object pattern, how would you 'check' if a situation is invalid? for e.g when there's no item found in the repository, display message 'not found' to the user.
Do I have to do a glorified null check?
- if obj.equals(new NullObject()) { showNotFound(); }
- if obj.ID.equals( INVALID_ID) { showNotFound(); }
Those techniques seem to defeat the purpose of Null Object pattern itself