allow func.params == null
Merge pull request #3014 from Atry/printer-fix-2

allow func.params == null