Don't crash when index is null