If activity is null at initialization, the app crashes. This change checks for null activity and throw react native error, which prevents app crash.
If activity is null at initialization, the app crashes. This change checks for null activity and throw react native error, which prevents app crash.