solution package – Camlex Query CSOM throws 400

I have a WSP that includes Camlex.Client 1.4, the WSP contains the DLL and targetDeployment is in GAC. On the server, the GAC contains the DLL.

I have a REST Service that connect to my ApplicationService layer to query documents’ items.

Code that doesn’t throw an error

var camlQuery = Camlex.Query().ToString();

Code that throws an error

var camlQuery = Camlex.Query().Where(item => item != null).ToString();

SharepointServer returns an error 400. I found correlationId from SPLogs but it doesn’t give any hint.

Please, note that camlQuery is not executed in both scenarios, so error 400 is thrown during assignment.

I have no idea why, could somone give me a lead ?