You could do this:
If you need to exclude null values and empty strings, the preferred way to do so is to chain together the conditions like so:
Chaining these methods together basically checks each condition independently: in the above example, we exclude rows where alias is either null or an empty string, so you get all Name objects that have a not-null, not-empty alias field. The generated SQL would look something like:
SELECT * FROM Name WHERE alias IS NOT NULL AND alias != ""
Hope this is helpfull!!