Checking of assigning to array