check for nil on db failure to connect