Adding test for firstNonEmpty function