make .when accept conditional in string