check undefined in react native
…