What I meant to say was that if we allowed a way of associating default values for each data type in the allowedTypes param. 

For ex - For the round function, while we have the defaults in the trailing arguments, I had to assign the same default value of "null" for both the data types VARCHAR and INTEGER in the second argument. 

@ Argument(allowedTypes={PDataType.TIMESTAMP, PDataType.DECIMAL}),
<b>@Argument(allowedTypes={PDataType.VARCHAR, PDataType.INTEGER}, defaultValue = "null", isConstant=true)</b>,
@ Argument(allowedTypes={PDataType.INTEGER}, defaultValue="1", isConstant=true)

Having something like

@ Argument(allowedTypes={PDataType.VARCHAR, PDataType.INTEGER}, <b>defaultValues = {"null", "1"} </b> isConstant=true)

would have helped. That way I wouldn't have to return false for evalToNullIfParamIsNull (would have been cleaner IMO).