Safer parsing of the keep argument to clean task