https://developerpublish.com/sql-servers-isnull-equivalent-in-postgresql/
SQL Server's ISNULL() equivalent in PostgreSQL