Updated size_t checks to work on other types of assignment.