Hi,
Only when the left side value may be null then only == show exception so just try to avoid such on your code.

Core java