Logistic Regression: Handle grouping in lower PG/GP versions

The previous commit handled grouping columns with type text by adding quotes to
grouping values, except for NULL values. Lower versions of PG and GP, however,
add quotes to all values using array_to_string skipping the NULL exception.
This commit handles that case by explicitly looking for 'null' in the group
values.