If cleanInput receives empty array it throws exception