cid#736782 dereference before null check
cid#736782 dereference before null check

and reduce scope of some variables

Change-Id: I1aada9af15090ff2083354ea9b265b9e3d4e5c02

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core