じゃ、これは?
文字列(str)の判定で
NULLじゃなく、空白でもない場合って処理で

if (str != null && !str.equals("") ) {}

の代わりに

if (!"".equals(str)) {}