Simplify code. Remove redundant casts and checks.

From sources/javadoc:
hudson.model.AbstractProject#getTrigger(Class<T> clazz)
* Gets the specific trigger, or null if the propert is not configured for this job.
If we leave them here, then the variables should be appended with commit, just like the trigger variables. Beyond that, I'm rather indifferent. I'd leave style up to the maintainer of the project.