This is something similar to saying "if nameSessed IS null, AND nameSessed.isEmpty() is true...."
If nameSessed is null, trying to acces isEmpty() method of that nulled reference throws a NullPointerException. If you need to check "null OR empty", you should use the short-circuit 'or' operator (||), so the second operand (nameSessed.isEmpty()) will not be checked, if the first operand (nameSessed==null) is true.
Not related to Servlets. Moving this to the Beginning Java forum.