Using predicate instead of instanceof to hide implementation details
Using toString() instead of casts