avoid unnecessary check-casts
simpler implementation of omit?