The program works fine, but if the 3rd condition is true (i.e. the list is ordered by increasing string length), the following error occurs: java.lang.NullPointerException at com.codegym.task.task07.task0718.Solution.main( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( Should I write a code to not display something, or is it ok to leave with this error? Thanks :)