Fix nil check and add ElapsedMilliseconds