changed the NumberExpression.cast(Number number) method to check that the number param is an instance of type or one of its children
Merge pull request #1044 from wwadge/number_expression_QUERYDSL_3_5_0

Tiny NumberExpression fix