Fix null dereference when checking halo types
Logical evaluations aren't necessarily short-circuited when an
argument evaluates to .false., so
if (associated(foo) .and. (foo%bar == baz))
may dereference foo even if it is unassociated. So don't do it.