avoid unnecessary check-casts