If your code is wrong you want to fail as soon as possible.
# authenticator == null
if (authenticator.getSessionError(session) == null) {
# Assumed session is okay, actually the bug is null authenticator
}