Fix potential null pointer error issue.

See: https://github.com/apache/cordova-android/pull/126