Type checking for array indexing is now working properly