skipping null result, when the item should not be displayed

adding $result->class when $result is null creates StdClass silently and yields error
later in the code