HHH-4700 - ClassCastException with parameter in CaseNode.getFirstThenNode()
HHH-9100 - Improve CAST function support