NullReferenceException bugfix for null arguments

Nasty bug introduced by @Florian in 0dfa3468 fixed. Unit test added
Please change to

```
var lambdaExpression = parameters[i] as LambdaExpression;
if(lambdaExpression != null) 
{
    parameters[i] = lambdaExpression.Compile();
}