check

fun <T> LiveData<T>.check(predicate: (T) -> Boolean): Boolean

Return

true if the LiveData's value matches the given predicate. false if it doesn't match or if the LiveData doesn't have a value.