HV-775 Throwing class cast exception if Node#as() is called with wrong type; Also disabling CheckStyle rule on complexity of OR statements