Avoid NPE if tid is null.

Using the latest Jenkins user.getProperty returns null if the property does not exist. This causes a NPE.