Expression<Func<Catalog, bool>> filter = userId==null?
(Expression<Func<Catalog, bool>>)x => x.IsPublished:
(Expression<Func<Catalog, bool>>)x => x.UserPtr == userId && x.IsPublished;
Expression<Func<Catalog, bool>> filter = x=> userId==null? x.IsPublished: x.UserPtr == userId && x.IsPublished;
<code>