Use pattern matching for clarity.