handle empty action name

Controller of Type \Zend\Mvc\Controller\AbstractRestfulController don't have an action name, therefore check first if it is set.

Since there is no way of disabling the AssetsBundle if there is also a rest api in the system.