filter nil strings out of array returned by detect