MAP: Handle possible NPE while disconnect map.

Precondition:
Verified with IOT: MecApp in MCE role

UseCase:
1. Connect MAS
2. Register Mas Instance via MNS
3. Disconnect MAS

Failure:
Bluetooth App crash sometimes when disconnect map profile.

Root Cause:
The issue is hit when MAS disconnect is finished before MNS unregister.
In this case NullpointerException is happening because of clearing
BluetoothMapContentObserver already as a part of cleanup.

Fix:
Handle Null pointer exception while last
MAS instance disconnect is handled before MNS
unregistration.

Change-Id: I4e72038a5ddc6c3ac8c515def57cb4f98fe87675
diff --git a/src/com/android/bluetooth/map/BluetoothMapService.java b/src/com/android/bluetooth/map/BluetoothMapService.java
index 9cca2c7..3e9cdcd 100644
--- a/src/com/android/bluetooth/map/BluetoothMapService.java
+++ b/src/com/android/bluetooth/map/BluetoothMapService.java
@@ -405,7 +405,7 @@
                     if (DEBUG) Log.d(TAG,"ContentObserver Registration MASID: " + msg.arg1
                         + " Enable: " + msg.arg2);
                     BluetoothMapMasInstance masInst = mMasInstances.get(msg.arg1);
-                    if (masInst != null) {
+                    if (masInst != null && masInst.mObserver != null) {
                         try {
                             if (msg.arg2 == BluetoothMapAppParams.NOTIFICATION_STATUS_YES) {
                                 masInst.mObserver.registerObserver();