Compare two booleans rather than String with && operator.

Error in Eclipse when using the older code