Before calling a function of an object, I need to check if the object is null, to avoid throwing a NullPointerException.
NullPointerException
What is the best way to go abou
You also can use StringUtils.isNoneEmpty("") for check is null or empty.
StringUtils.isNoneEmpty("")