refactoring nullObject pattern