More resilient checks re: "is this an R package?"