prune some dead logic for null dataset contexts