Flip the comparisons the other way around so you're calling equals() on the string literals, which aren't null and thus won't cause the exception.
When null is passed to the equals() method, it simply returns false right away. However, if you try to call it on a variable that's null, the object isn't there for you to call that method on, which is why you get the exception.
if ("All".equals(graphType) || "ALL".equals(graphType))
If you just want to do case-insensitive matches, use the equalsIgnoreCase() method instead so you just perform one check:
if ("All".equalsIgnoreCase(graphType))