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.