Removed wrong operator json error.

We were using the || operator instead of && operator. moreover we were comparing
heading object which was null with empty string.
Fixed these two bugs