Check for actions before looping over them
Merge pull request #4476 from ragulka/check-for-actions

Check for actions before looping over them