Adding null check for CCScale9Sprite opacity setting.