checking for nil to prevent crash
checking for nil to prevent crash

mattt/TransformerKit,zhaoguohui/TransformerKit,mattt/TransformerKit,zhaoguohui/TransformerKit,gaurav1981/TransformerKit,gaurav1981/TransformerKit,mattt/TransformerKit,kgn/TransformerKit