Added more complete example; Demonstrated type checking using a case statement.