refactored ofNullable test