if (!$categoryId = filter_var($categoryId, FILTER_VALIDATE_INT)) {
            throw new Exception("Cannot delete category - no ID given"); 
        }