Moved function check inside compileExp

Moved function check inside compileExp, so anything can pass in functions in addition to using expressions for each linq like array method.