Added condition to determine the controllers existens.

I got a notice for an undifined index as i played around with PhlyRestfully module where no real controllers are used for mapping resource classes.
Merge pull request #2 from siad007/patch-2

Added condition to determine the controllers existens.