add case statement type narrowing