Fix NullPointerException: delete session only if existed