Add bounds checking at variable initialisation