Handle null values when reading a database