fixes ifPresent test on checked mode