Prefer instanceof over getKind() checks where possible, as these work well with pattern matching instanceofs