Corrected incorrect logic choosing whether to use anyNA() or not