tighten asseration for id mask checking