How to alter my query in hook_views_query_alter to use the right where expression?
I'm not 100% sure, but I think to add the "IS NULL" part, you may need spaces around "IS" such as:

$query-&gt;add_where('fee_schedule_payments', 'fee_schedule_payments.pid', 'NULL', ' IS ');


OR...maybe something using add_where_expression...

$query-&gt;add_where_expression(0, 'fee_schedule_payments.pid IS NULL');