Check out example codes for "boolean java.lang.String.equals(java.lang.Object)' on a null object reference". It will help you in understanding the concepts better.

Code Example 1

if (called_from != null && called_from.equalsIgnoreCase("add")) {

Learn ReactJs, React Native from akashmittal.com