check if $forms empty before foreach
Merge pull request #26 from tripflex/patch-1

check if $forms empty before foreach