Added check for ACL resource before calling isAllowed()

Adding this check if the resource is available in the ACL will prevent PHP errors if resource was not added or isn't available.