I just was tidying my code a bit and there was this piece:
String saving = getValue(); if(saving != null && saving.equals(\"true\")){ // do someth
if("true".equals(saving)){ // do something }
This is very safe and good practice. String "true" will never be null. So you will never compare your String to null. This piece of code is perfectly fine