fix Issue 8589 - Incorrect conversion of function returning `typeof(null)` to function returning an array
Merge pull request #1119 from 9rnsr/fix8589

Issue 8589 - Incorrect conversion of function returning `typeof(null)` to function returning an array