Add null check of Android plugin
Fix iOS userAgent bug