Adding isCase behavior to when clauses