Selecting NULL value from the database

There is no specific issue with retrieving null values from the database. They will come back as the PHP NULL value.

WordPress uses either the function mysqli_fetch_object or mysql_fetch_object to retrieve results from the database.

https://php.net/manual/en/function.mysql-fetch-object.php
https://php.net/manual/en/mysqli-result.fetch-object.php

According to those respective pages:

Note: This function sets NULL fields to the PHP NULL value.

Are you using is_null() to check for the value? Or are you comparing the result to the NULL constant using the identity check (===)?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)