added check for null permissions
Merge pull request #577 from aogilvie/fix/null-permissions-array

added check for null permissions