Added some null checks for mMap.