Use pattern matching instead.