Made size_t checks work with casting.