I'm checking that it is null as part of the condition to authenticate with just (username + password + ID-file). It's possible that another future extension could be a client asking for username+password+ID-file+passphrase. It is this case that's implemented with line 110:
            client.login(endpointURI.getUser(), endpointURI.getPassword(), idFile);

I don't mind making the change you suggest (throw Ex if passphase is not null), but this would need to be undone when/if someone wants to implement (username+password+ID-file+passphrase)