It's the ternary operator. Because the first option trueValue.equalsIgnoreCase(fieldValue) is a boolean, it seems to assume the second option defaultValue is a boolean rather than a nullable Boolean. It's odd, but that seems to be what's happening. If you cast the first option to Boolean, the error goes away:
Boolean value = (fieldValue != null ? (Boolean) trueValue.equalsIgnoreCase(fieldValue) : defaultValue);