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.
This is not a just different method, it root method. This child method is not used in other methods. I see no way to cleanly move all RevisionParameterAction calculation to separate method because of findPreviousBuildForPullId, so this done in this way.