Bug 1007604 - add additional null check; r=sicking

--HG--
extra : rebase_source : 6ea67b48610f7b56e1ab3e33a3a4a42bb33329f4