Keep track of number of initialized fields and avoid undefined checks