Fixed throw null exception when globals has null value.