Use isset on categories check.