Refactored to avoid unnecessary View.getItem() call
Refactored to avoid unnecessary cast
[JENKINS-21314] Stack trace displayed (...) configure PrioritySorter

Fixed related issue where exception was thrown when trying
to save empty PriorityStrategy list and "Use additional
rules when assigning a priority to a Job" was enabled.