if(Optional.isPresent())
This inspection only reports if the project or module is configured to use a language level of 8 or higher.