BUGFIX: Added check for null on group.field and group.query.