handle nils from the database