Correct way to check for null or empty or string containing only spaces is like this:
if(str != null && !str.trim().isEmpty()) { /* do your stuffs here */ }
1.4m articles
1.4m replys
5 comments
56.9k users