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.
I agree with @DavidTanner, I don't see the value of removing this method and moving the contents to a different method. Every method should do one thing and do it well. We can't always follow this, but we should at least try. The reasoning for removing this can be applied to any method.