Could you split this up into a couple of smaller predicates? This line is way too long and does not reveal intent.