Annotate function arguments with Union(Function,DataType)

This should address the issue #3470.

Note: DataType here allows constructor to be passed like a function.