My first tip for B4J.
IsEmptyString(); Returns True if x parameter is empty string or null
IsEmptyString(); Returns True if x parameter is empty string or null
B4X:
Public Sub IsEmptyString(x As String) As Boolean
Dim bEmpty As Boolean
bEmpty = x = Null ' Because pure Null
If Not( bEmpty ) Then
bEmpty = x.CompareTo(Null) = 0 ' Because origin is field of table bbdd
If Not( bEmpty ) Then
Dim cTrim As String = x.Trim
bEmpty = cTrim.Length < 1
End If
End If
Return bEmpty
End Sub