string flutter is null or not check code example Example: flutter check if null var value = maybeSomeNumber(); if (value != null) { doSomething(); }