unnecessary cast checks are now skipped