fix empty navbar search

Implements https://trello.com/card/submitting-an-empty-search-form-throws-undefined-method-group-name-for-nil-nilclass/50db1f1f9aaccd882d00272c/84