adding null check for outwrapper