Replace !isEmpty with nonEmpty