fix assert_is_mask to avoid floating-point comparison with nans