Here's a little piece of code that allows you to get a Key from the provided map. If the map doesn't contain the key then it'll return null.
This is perfect to use with single line declares:
B4X:
Private Sub GetIfExists (SourceMap As Map, Key As Object) As Object
If SourceMap.ContainsKey(Key) Then
Return SourceMap.Get(Key)
Else
Return Null
End If
End Sub
This is perfect to use with single line declares:
B4X:
Dim SomeValue As String = GetIfExists(SomeMap, TheKey)